Skip to content
Calcrivo

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

  1. Matrix A (defines column space)

    = 1 0 1 1 1 2

  2. AᵀA

    = 3 3 3 5

  3. (AᵀA)⁻¹

    = 0.833333 -0.5 -0.5 0.5

  4. P = A(AᵀA)⁻¹Aᵀ

    = 0.833333 0.333333 -0.166667 0.333333 0.333333 0.333333 -0.166667 0.333333 0.833333

  5. 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