Generalized Inverse — Definition, Formula & Example
The generalized inverse, most often the Moore-Penrose pseudoinverse , is a matrix that behaves as closely as possible like an inverse for a matrix that has no ordinary inverse. This includes non-square matrices and singular square matrices.
For a real matrix , the Moore-Penrose pseudoinverse is the unique matrix satisfying all four Penrose conditions: , , , and . It exists for every matrix. If is invertible, then . For complex matrices, replace the transpose with the conjugate transpose. More broadly, any matrix with is called a generalized inverse of . Such a need not be unique, so the four conditions are what single out .
Key Formula
Where:
- = An m × n matrix whose n columns are linearly independent (full column rank)
- = The transpose of A, an n × m matrix
- = An n × n square matrix, invertible when the columns of A are independent
- = The Moore-Penrose pseudoinverse of A, an n × m matrix
Worked Example
Problem: Find the pseudoinverse of the 3 × 2 matrix . Its two columns are linearly independent, so the formula applies.
Step 1: Multiply the transpose of A by A. The result is a 2 × 2 square matrix.
Step 2: Invert this 2 × 2 matrix. Its determinant is , which is not zero.
Step 3: Multiply the result by on the right to get .
Answer: . As a check, , the 2 × 2 identity matrix. So is a left inverse of , even though is not square.
Why It Matters
Suppose a system has more equations than unknowns and no exact solution. Then gives the least-squares solution, the one that makes the error as small as possible. If there are many least-squares solutions, is the shortest one. This is how linear regression fits a line to data in statistics, and how data science and engineering software solve overdetermined systems. In practice, numerical libraries compute from the singular value decomposition (SVD).
Common Mistakes
Mistake: Assuming that both and equal the identity matrix, as they would for an ordinary inverse.
Correction: In the example, , but is a 3 × 3 matrix with diagonal entries , not 1. That product projects vectors onto the column space of and is not . Also, the formula works only when the columns of are independent. Use when the rows are independent, and the SVD otherwise.
