Projection Matrix Calculator
Build the orthogonal projection matrix onto the column space of a given matrix.
Inputs
Projection Matrix P = A(AᵀA)⁻¹Aᵀ
0.833333 0.333333 -0.166667 0.333333 0.333333 0.333333 -0.166667 0.333333 0.833333
Rank of A
2
Step by step
Matrix A (defines column space)
= 1 0 1 1 1 2
AᵀA
= 3 3 3 5
(AᵀA)⁻¹
= 0.833333 -0.5 -0.5 0.5
P = A(AᵀA)⁻¹Aᵀ
= 0.833333 0.333333 -0.166667 0.333333 0.333333 0.333333 -0.166667 0.333333 0.833333
Rank of A
= 2
How it works
The projection matrix P = A(AᵀA)⁻¹Aᵀ projects any vector onto the column space of A. It is used in least-squares regression: the best-fit solution minimises ||b − Ax|| by projecting b onto Col(A). P is symmetric and idempotent (P² = P).
Formula
Projection Matrix
P = A(AᵀA)⁻¹Aᵀ
- A
- Matrix whose columns span the subspace
- P
- Projection matrix (symmetric, idempotent)
Frequently Asked Questions
What does the projection matrix do?
It maps any vector to its closest point in the column space of A. The result is the orthogonal projection — the residual (b − Pb) is perpendicular to the column space.
What if columns of A are dependent?
Then AᵀA is singular and cannot be inverted. Remove dependent columns first, or use the pseudoinverse.
You might also need
- Vector Projection CalculatorCommonly used together
- QR Decomposition CalculatorCommonly used together
- Gaussian Elimination CalculatorCommonly used together
- Dot Product CalculatorAlso in Linear Algebra
- Cholesky Decomposition CalculatorAlso in Linear Algebra
- LU Decomposition CalculatorAlso in Linear Algebra