Pseudoinverse Calculator

Enter the six entries of a 3×2 matrix A to compute its Moore-Penrose pseudoinverse A⁺ = (AᵀA)⁻¹Aᵀ, along with a rank check and an A⁺A = I verification.

Quick Facts

Defining conditions
AA⁺A = A and A⁺AA⁺ = A⁺
Along with AA⁺ and A⁺A both being symmetric, these four conditions uniquely define the Moore-Penrose pseudoinverse.
Full column rank formula
A⁺ = (AᵀA)⁻¹Aᵀ
Used here for a "tall" 3×2 matrix whose two columns are linearly independent.
Full row rank formula
A⁺ = Aᵀ(AAᵀ)⁻¹
The mirror-image formula for "wide" matrices with more columns than rows.
Square, invertible case
A⁺ = A⁻¹
If A is square and non-singular, the pseudoinverse reduces to the ordinary matrix inverse.

Your Results

Calculated
det(AᵀA)
-
Nonzero confirms A's columns are linearly independent
Pseudoinverse A⁺ (2×3)
-
A⁺ = (AᵀA)⁻¹Aᵀ
Column rank
-
Whether the closed-form left-pseudoinverse formula applies
Verification
-
Largest entrywise error in A⁺ · A vs. the 2×2 identity matrix

Ready

Enter the six matrix entries, then press Calculate.

How the Moore-Penrose Pseudoinverse Works

The Moore-Penrose pseudoinverse, written A⁺, generalizes the matrix inverse to matrices that are not square or that have no ordinary inverse. Every real matrix A has exactly one pseudoinverse A⁺, and it is defined by four conditions: AA⁺A = A, A⁺AA⁺ = A⁺, and both AA⁺ and A⁺A are symmetric. When A is square and invertible, A⁺ = A⁻¹ exactly. When A is not square, A⁺ is the matrix that produces the best least-squares solution to Ax = b, which is why it shows up constantly in linear regression, robotics, and control theory.

Formula and method

For a "tall" matrix A with more rows than columns whose columns are linearly independent (full column rank), the pseudoinverse has a closed form: A⁺ = (AᵀA)⁻¹Aᵀ. This calculator uses a 3×2 matrix A: it first forms the 2×2 matrix AᵀA, checks that its determinant is nonzero (which confirms A's two columns are linearly independent), inverts that 2×2 matrix, and multiplies the result by Aᵀ to get the 2×3 pseudoinverse. For the mirror-image case — a "wide" matrix with more columns than rows and independent rows — the formula is instead A⁺ = Aᵀ(AAᵀ)⁻¹. Neither formula works when A is rank-deficient in the relevant direction; that general case requires the singular value decomposition (SVD), A = UΣVᵀ, giving A⁺ = VΣ⁺Uᵀ where Σ⁺ is formed by taking the reciprocal of each nonzero singular value.

Common sources of error

  • Forgetting the transpose: A⁺ = (AᵀA)⁻¹Aᵀ is not the same matrix as (A⁻¹) — that inverse does not exist unless A is square, so the transpose step is not optional.
  • Assuming AA⁺ = I: for a tall full column rank matrix, A⁺A = I (the 2×2 identity here), but AA⁺ is a 3×3 projection matrix, not the identity — only square invertible matrices satisfy both.
  • Ignoring rank deficiency: if the two columns of A are parallel (one is a scalar multiple of the other), AᵀA is singular, det(AᵀA) = 0, and this closed-form formula cannot be used — the SVD-based pseudoinverse is needed instead.

Checking your result

The most reliable check is to multiply the computed A⁺ by the original A: for a full column rank matrix, A⁺A should equal the 2×2 identity matrix (1s on the diagonal, 0s elsewhere) up to rounding error. This calculator performs that check automatically and reports the largest entrywise deviation from the identity — a value near zero (below roughly 1e-8) confirms the pseudoinverse was computed correctly.

Applications

  • Least-squares regression: fitting a line or plane through data points that outnumber the unknown coefficients, exactly the shape of the default 3×2 example (three data points, an intercept and a slope).
  • Robotics and inverse kinematics: converting a desired end-effector velocity into joint velocities when the Jacobian matrix is not square.
  • Control systems and signal processing: solving over-determined or under-determined linear systems that arise in state estimation and filter design.
  • Image and data compression: the pseudoinverse appears alongside the SVD in low-rank approximation and denoising techniques.

Frequently Asked Questions

What is the Moore-Penrose pseudoinverse?
The Moore-Penrose pseudoinverse A+ is a generalization of the matrix inverse that exists for any matrix, including non-square and singular ones. It is the unique matrix satisfying the four Moore-Penrose conditions: AA+A = A, A+AA+ = A+, and both AA+ and A+A are symmetric (Hermitian). When A is square and invertible, A+ equals the ordinary inverse A⁻¹.
How do you calculate the pseudoinverse of a non-square matrix?
If a matrix A has more rows than columns and its columns are linearly independent (full column rank), the pseudoinverse is A+ = (AᵀA)⁻¹Aᵀ. If instead A has more columns than rows with independent rows (full row rank), use A+ = Aᵀ(AAᵀ)⁻¹. For matrices that are rank-deficient in both directions, the pseudoinverse must be computed from the singular value decomposition (SVD).
What is the difference between the pseudoinverse and the regular inverse?
A regular inverse A⁻¹ only exists for square matrices with a nonzero determinant, and A·A⁻¹ = A⁻¹·A = I exactly. The pseudoinverse A+ exists for every matrix, square or not, singular or not. For a tall, full column rank matrix, A+A = I (the smaller identity), but AA+ is only a projection matrix, not the identity, unless A is also square.
When does this closed-form pseudoinverse formula fail?
The formula A+ = (AᵀA)⁻¹Aᵀ fails when AᵀA is singular, which happens whenever the matrix's columns are linearly dependent (rank-deficient). In that case det(AᵀA) = 0, the inverse cannot be formed, and the pseudoinverse must instead be computed via singular value decomposition (SVD), which is beyond a simple closed-form calculator.