Mathwords logoMathwords

Generalized Inverse — Definition, Formula & Example

The generalized inverse, most often the Moore-Penrose pseudoinverse A+A^{+}, 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 m×nm \times n matrix AA, the Moore-Penrose pseudoinverse is the unique n×mn \times m matrix A+A^{+} satisfying all four Penrose conditions: AA+A=AAA^{+}A = A, A+AA+=A+A^{+}AA^{+} = A^{+}, (AA+)T=AA+(AA^{+})^{T} = AA^{+}, and (A+A)T=A+A(A^{+}A)^{T} = A^{+}A. It exists for every matrix. If AA is invertible, then A+=A−1A^{+} = A^{-1}. For complex matrices, replace the transpose with the conjugate transpose. More broadly, any matrix GG with AGA=AAGA = A is called a generalized inverse of AA. Such a GG need not be unique, so the four conditions are what single out A+A^{+}.

Key Formula

A+=(ATA)−1AT(columns of A linearly independent)A^{+} = (A^{T}A)^{-1}A^{T} \quad \text{(columns of } A \text{ linearly independent)}
Where:
  • AA = An m × n matrix whose n columns are linearly independent (full column rank)
  • ATA^{T} = The transpose of A, an n × m matrix
  • ATAA^{T}A = An n × n square matrix, invertible when the columns of A are independent
  • A+A^{+} = The Moore-Penrose pseudoinverse of A, an n × m matrix

Worked Example

Problem: Find the pseudoinverse of the 3 × 2 matrix A=[100111]A = \begin{bmatrix} 1 & 0 \\ 0 & 1 \\ 1 & 1 \end{bmatrix}. 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.
ATA=[101011][100111]=[2112]A^{T}A = \begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \end{bmatrix}\begin{bmatrix} 1 & 0 \\ 0 & 1 \\ 1 & 1 \end{bmatrix} = \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}
Step 2: Invert this 2 × 2 matrix. Its determinant is 2⋅2−1⋅1=32 \cdot 2 - 1 \cdot 1 = 3, which is not zero.
(ATA)−1=13[2−1−12](A^{T}A)^{-1} = \frac{1}{3}\begin{bmatrix} 2 & -1 \\ -1 & 2 \end{bmatrix}
Step 3: Multiply the result by ATA^{T} on the right to get A+A^{+}.
A+=13[2−1−12][101011]=13[2−11−121]A^{+} = \frac{1}{3}\begin{bmatrix} 2 & -1 \\ -1 & 2 \end{bmatrix}\begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \end{bmatrix} = \frac{1}{3}\begin{bmatrix} 2 & -1 & 1 \\ -1 & 2 & 1 \end{bmatrix}
Answer: A+=13[2−11−121]A^{+} = \dfrac{1}{3}\begin{bmatrix} 2 & -1 & 1 \\ -1 & 2 & 1 \end{bmatrix}. As a check, A+A=I2A^{+}A = I_2, the 2 × 2 identity matrix. So A+A^{+} is a left inverse of AA, even though AA is not square.

Why It Matters

Suppose a system Ax=bAx = b has more equations than unknowns and no exact solution. Then x=A+bx = A^{+}b gives the least-squares solution, the one that makes the error ∥Ax−b∥\lVert Ax - b \rVert as small as possible. If there are many least-squares solutions, A+bA^{+}b 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 A+A^{+} from the singular value decomposition (SVD).

Common Mistakes

Mistake: Assuming that both A+AA^{+}A and AA+AA^{+} equal the identity matrix, as they would for an ordinary inverse.
Correction: In the example, A+A=I2A^{+}A = I_2, but AA+AA^{+} is a 3 × 3 matrix with diagonal entries 23\tfrac{2}{3}, not 1. That product projects vectors onto the column space of AA and is not I3I_3. Also, the formula (ATA)−1AT(A^{T}A)^{-1}A^{T} works only when the columns of AA are independent. Use AT(AAT)−1A^{T}(AA^{T})^{-1} when the rows are independent, and the SVD otherwise.

Related Terms