Projection Matrix Calculator
Build the orthogonal projection matrix onto the column space of a given matrix.
About Projection Matrix Calculator
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)
Worked example
With the default values below, Projection Matrix Calculator returns Projection Matrix P = A(AᵀA)⁻¹Aᵀ of 0.833333 0.333333 -0.166667 0.333333 0.333333 0.333333 -0.166667 0.333333 0.833333. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Matrix A (columns define the subspace)
- 1 0 1 1 1 2
Results
- 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
- 1Matrix A (defines column space)= 1 0 1 1 1 2
- 2AᵀA= 3 3 3 5
- 3(AᵀA)⁻¹= 0.833333 -0.5 -0.5 0.5
- 4P = A(AᵀA)⁻¹Aᵀ= 0.833333 0.333333 -0.166667 0.333333 0.333333 0.333333 -0.166667 0.333333 0.833333
- 5Rank of A= 2
Assumptions and limits
- The result is derived only from the single input listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to whole numbers, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
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.
Related Calculators
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
