Last verified · v1.0
Calculator · math
Moore Penrose Pseudoinverse Calculator (2×2 Matrix)
Compute the Moore-Penrose pseudoinverse A⁺ of any 2×2 matrix — invertible, singular, or zero — using exact closed-form formulas instantly.
Inputs
Selected Entry of Pseudoinverse A⁺
—
Explain my result
Get a plain-English breakdown of your result with practical next steps.
The formula
How the
result is
computed.
Moore-Penrose Pseudoinverse for 2×2 Matrices
The Moore-Penrose pseudoinverse, denoted A⁺ (also written A†), generalizes matrix inversion to any matrix — square or rectangular, invertible or singular. For a 2×2 matrix A with entries a (top-left), b (top-right), c (bottom-left), and d (bottom-right), the pseudoinverse is determined by three distinct cases based on the determinant and whether A is the zero matrix. This pseudoinverse calculator automates all three cases and returns any selected entry of A⁺ with full step-by-step working.
The Three-Case Formula
Case 1: Invertible Matrix (det(A) ≠ 0)
When the determinant ad − bc is nonzero, A is invertible and the pseudoinverse equals the classical inverse:
A⁺ = (1 / (ad − bc)) × [[d, −b], [−c, a]]
Example: for A = [[2, 1], [3, 4]], det = (2)(4) − (1)(3) = 5. The pseudoinverse is (1/5) × [[4, −1], [−3, 2]], giving A⁺₁₁ = 0.8, A⁺₁₂ = −0.2, A⁺₂₁ = −0.6, A⁺₂₂ = 0.4. Verification: A × A⁺ = I₂, confirming A⁺ = A⁻¹ in the invertible case.
Case 2: Singular Non-Zero Matrix (det(A) = 0, A ≠ 0)
When A is singular but contains at least one nonzero entry, the pseudoinverse uses the transpose divided by the squared Frobenius norm:
A⁺ = Aᵀ / (a² + b² + c² + d²)
The denominator a² + b² + c² + d² equals ‖A‖²F, the sum of squares of all entries. Example: for A = [[1, 2], [2, 4]], det = 4 − 4 = 0 (singular). The Frobenius norm squared is 1 + 4 + 4 + 16 = 25. The transpose Aᵀ = [[1, 2], [2, 4]], so A⁺ = [[0.04, 0.08], [0.08, 0.16]]. This formula produces the unique pseudoinverse because it satisfies all four Moore-Penrose conditions for rank-deficient matrices.
Case 3: Zero Matrix (A = 0)
If every entry equals zero, then A⁺ = 0. This follows from the first Moore-Penrose condition: AA⁺A = A must hold, which is trivially satisfied when A = 0. No division is performed and no entries are nonzero.
Mathematical Foundation: SVD Derivation
The pseudoinverse is formally defined via the Singular Value Decomposition (SVD): any matrix A = UΣVᵀ where U and V are orthogonal and Σ is diagonal with nonnegative singular values σ₁ ≥ σ₂ ≥ 0. The pseudoinverse is A⁺ = VΣ⁺Uᵀ, where Σ⁺ replaces each nonzero σᵢ with 1/σᵢ and leaves zeros unchanged. According to Snyder's SVD treatment at Boston University, A⁺ is the unique matrix satisfying all four Moore-Penrose conditions: (1) AA⁺A = A, (2) A⁺AA⁺ = A⁺, (3) (AA⁺)ᵀ = AA⁺, and (4) (A⁺A)ᵀ = A⁺A. For 2×2 matrices, the SVD formula collapses into the three closed-form cases above, allowing exact arithmetic without iterative methods. As documented in The Matrix Cookbook by Petersen and Pedersen, these identities underpin pseudoinverse computations across numerical linear algebra, statistics, and machine learning.
Variable Definitions
- a (a₁₁): Entry in row 1, column 1 of matrix A — the top-left element
- b (a₁₂): Entry in row 1, column 2 of matrix A — the top-right element
- c (a₂₁): Entry in row 2, column 1 of matrix A — the bottom-left element
- d (a₂₂): Entry in row 2, column 2 of matrix A — the bottom-right element
- det(A): Determinant ad − bc; determines which formula branch applies
- ‖A‖²F: Squared Frobenius norm a² + b² + c² + d²; used as the denominator in Case 2
- A⁺ entry: The specific (row, column) element of A⁺ selected for display
Practical Applications
The pseudoinverse solves minimum-norm least-squares problems of the form Ax ≈ b. The solution x⁺ = A⁺b minimizes ‖Ax − b‖² and, among all minimizers, has the smallest Euclidean norm ‖x‖. Typical use cases include:
- Linear regression: Computing coefficients when predictor columns are collinear (design matrix singular)
- Image processing: Inverting rank-deficient blurring or downsampling operators
- Control systems: Finding minimum-energy control inputs for underdetermined state equations
- Statistics and machine learning: Ridge regression, PCA reconstruction, and generalized linear models all rely on pseudoinverse-type computations
Numerical Verification Example
Given A = [[3, 6], [1, 2]]: det = 6 − 6 = 0 (singular, non-zero). Frobenius norm squared = 9 + 36 + 1 + 4 = 50. Transpose Aᵀ = [[3, 1], [6, 2]]. Therefore A⁺ = [[3/50, 1/50], [6/50, 2/50]] = [[0.06, 0.02], [0.12, 0.04]]. Confirming condition (1): AA⁺A = [[3,6],[1,2]] × [[0.06,0.02],[0.12,0.04]] × [[3,6],[1,2]] = [[3,6],[1,2]] = A. ✓
Reference