In linear algebra, a QR decomposition, also known as a QR factorization or QU factorization, is a decomposition of a matrix A into a product A = QR of an orthonormal matrix Q and an upper triangular matrix R. QR decomposition is often used to solve the linear least squares (LLS) problem and is the basis for a particular eigenvalue algorithm, the QR algorithm.
== Cases and definitions ==
=== Square matrix ===
Any real square matrix A may be decomposed as
A
=
Q
R
,
{\displaystyle A=QR,}
where Q is an orthogonal matr...