Compute orthogonal projection matrix and project vectors
Enter Direction Vector for Line in 2D
Vector to Project (Optional)
Enter Two Vectors Spanning Plane in 3D
Vector to Project (Optional)
Result
Step-by-Step Derivation
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.
Free online calculators and tools covering mathematics, unit conversion, text processing, and daily life. Accurate, fast, mobile-friendly, and completely free to use.