Orthogonal Factorization
Theorem Every real m×n matrix A (m≥n) can be written as A=QR, where Q is an m×m orthogonal matrix and R is an m×n upper triangular matrix.
- Thin QR: A=ˆQˆR, where ˆQ is m×n and ONC, and ˆR is n×n and upper triangular.
We can get the thin from Q by converting to matrix:
Q_hat = Matrix(Q)
#6×4 Matrix{Float64}:
# -0.35793 -0.14544 -0.152543 0.829375
# -0.178965 -0.71283 -0.130244 -0.0381754
# -0.417585 0.207821 -0.702897 -0.0976324
# -0.298275 -0.498701 0.397811 -0.146905
# -0.536895 0.0280366 -0.078145 -0.512537
# -0.536895 0.421951 0.548947 0.129896
Verify that QTQ is the identity: