IP331.com | Online Tools
Home›Matrices›Projection Matrix Calculator

Projection Matrix Calculator

Compute orthogonal projection matrix and project vectors

Enter Direction Vector for Line in 2D
Vector to Project (Optional)

Projection Matrix Formula

P = A(A^T A)^{-1} A^T
P² = P (idempotent)
P^T = P (symmetric)
proj_v(x) = Px

The orthogonal projection matrix P projects vectors onto the column space of matrix A. The projection is idempotent (applying it twice gives the same result) and symmetric. The matrix I-P projects onto the orthogonal complement.

⚠ For projection onto a line spanned by vector v, the formula simplifies to P = (vv^T)/(v^T v). Verify: P² = P and Pv = v.

What is a Projection Matrix?

A projection matrix is a square matrix P that is idempotent (P² = P) and symmetric (P^T = P) for orthogonal projections. Projection matrices find applications in least squares, where they project onto the column space of a matrix to minimize squared error, and in many geometric transformations.

Idempotent

P² = P. Applying projection twice is same as once. Already on subspace stays.

Symmetric

P^T = P for orthogonal projection. Ensures minimum distance property.

Orthogonal

x - Px is orthogonal to subspace. Minimizes ||x - Px|| (least squares).

Eigenvalues

Eigenvalues are 0 and 1 only. 1 for subspace, 0 for orthogonal complement.

Teaching Example: Project [2,3] onto line [1,1].
1. v^T v = 1*1 + 1*1 = 2
2. vv^T = [[1,1],[1,1]]
3. P = [[1,1],[1,1]]/2 = [[0.5,0.5],[0.5,0.5]]
4. proj = Px = [(2+3)/2, (2+3)/2] = [2.5,2.5].

Applications

Least Squares Linear Regression Orthogonal Decomp Optimization Computer Graphics

Frequently Asked Questions

What is a projection matrix?▼
P = A(A^T A)^-1 A^T. Projects orthogonally onto column space of A. P² = P.
Projection properties?▼
P²=P (idempotent), P^T=P (symmetric), I-P projects onto orthogonal complement.
Projection onto a line?▼
For vector v: P = (vv^T)/(v^T v). For R²: [[a²,ab],[ab,b²]]/(a²+b²).
Applications of projection?▼
Least squares, linear regression, orthogonal decomposition, optimization, computer graphics.

More Matrix Tools

Free online calculators and tools covering mathematics, unit conversion, text processing, and daily life. Accurate, fast, mobile-friendly, and completely free to use.

© 2026 IP331.com - Free Online Tools. All rights reserved.

Privacy Policy | Cookie Policy | Terms of Use | Disclaimer