QR Factorization

Compute the QR Factorization of a matrix $A$ using Gram-Schmidt orthogonalization.
Useful for solving least squares problems and computing eigenvalues.

For an $m \times n$ matrix $A$, the QR factorization is:

$$ A = QR $$

Components:

  • $Q$ is an $m \times m$ orthogonal matrix (or $m \times n$ for economy QR)
  • $R$ is an $m \times n$ upper triangular matrix (or $n \times n$ for economy QR)
  • $Q^TQ = I$ (columns of $Q$ are orthonormal)

Applications:

  • Solving least squares problems: $\min \|Ax - b\|$
  • Computing eigenvalues (QR algorithm)
  • Orthonormalizing a set of vectors
Rows $m$: Columns $n$:
QR Type:
Output Form:
© 2025 Shelvean Kapita: kapita@tamu.edu
Last modified: July 27, 2025
Licensed under the MIT License.