Orthogonal Projection Matrix Calculator

Build projection matrices onto subspaces using orthonormal bases. Choose QR method, precision controls, and dimension presets. Export matrices or steps to CSV and PDF easily, too. Validate symmetry and idempotence with residuals; project vectors cleanly. Your reliable companion for geometric linear transformation tasks today.

Inputs
Example above is a 3×2 basis.
Example Data Table

A small example demonstrating a 3×2 basis and a 3×1 vector.

Example A
11
1-1
01
Example x
2
1
3
Use “Load Example” to paste these into the inputs.
Results

Fill the inputs and click Compute Projection to see results.
Formula Used

For a basis matrix A whose columns span a subspace of ℝm, the orthogonal projection onto Col(A) is:

P = A (AᵀA)−1 Aᵀ = Q Qᵀ, where A = Q R (QR).

We compute an orthonormal basis Q via modified Gram–Schmidt. This avoids explicit inversion and is typically more numerically stable. If requested, we attempt the normal-equations formula using (AᵀA)−1.

How to Use
  1. Enter your basis matrix A. Each row on a separate line.
  2. Optionally enter a vector x to project onto Col(A).
  3. Choose the method and number of decimal places to display.
  4. Click Compute Projection to generate P and optional P x.
  5. Use the CSV buttons to export P, Q, or P x as files.
  6. Click Download Results as PDF to capture the result card.
FAQs

A should be m×k, with columns representing basis vectors in ℝm. The projection matrix P is then m×m.

Dependent columns are automatically handled by QR: Q contains only independent directions. The rank r ≤ k determines the subspace dimension.

QR avoids inverting AᵀA, improving stability and handling near-singular bases better. It directly yields P = Q Qᵀ.

Yes. The complement projector is P = I − P. Projecting yields x = (I − P) x.

Ideally, ‖P² − P‖ and ‖Pᵀ − P‖ are near zero. Larger values suggest numerical issues or poorly scaled data.

Scaling affects numerical conditioning but not the subspace. QR mitigates issues; consider rescaling columns for tough cases.

Yes. After computing P once, apply it to each vector x. Or use Q to compute xproj = Q(Qᵀx) without forming P explicitly.

Related Calculators

Row Reduction RREF CalculatorDiagonalization Checker CalculatorLU Decomposition Steps CalculatorQR Decomposition Steps Calculatormatrix calculator with variablesGauss-Jordan inverse calculatorPolynomial linear independence calculatorLinear independence of matrix calculatorComplex matrix inverse calculatorQR decomposition least squares

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.