terican

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.

FreeInstantNo signupOpen source

Inputs

Selected Entry of Pseudoinverse A⁺

Explain my result

0/3 free

Get a plain-English breakdown of your result with practical next steps.

Selected Entry of Pseudoinverse A⁺

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 nonneg­ative 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

Frequently asked questions

What is the Moore-Penrose pseudoinverse and when is it used?
The Moore-Penrose pseudoinverse A⁺ is a generalization of the matrix inverse that exists for every matrix — square, rectangular, invertible, or singular. It finds the minimum-Euclidean-norm least-squares solution x⁺ = A⁺b to the linear system Ax = b, even when no exact solution exists. Applications include linear regression with collinear predictors, image deblurring, underdetermined control systems, and machine learning model fitting where the data matrix is rank-deficient.
How does the pseudoinverse calculator handle a singular 2×2 matrix?
When the determinant ad − bc equals zero but at least one entry of A is nonzero, the calculator applies A⁺ = Aᵀ / (a² + b² + c² + d²). The numerator is the transpose of A and the denominator is the squared Frobenius norm. For example, A = [[2, 4], [1, 2]] gives det = 0, Frobenius norm squared = 4 + 16 + 1 + 4 = 25, and A⁺ = [[0.08, 0.04], [0.16, 0.08]]. If A is the zero matrix, A⁺ = 0 instead.
What are the four Moore-Penrose conditions that uniquely define A⁺?
The four conditions are: (1) AA⁺A = A, meaning A⁺ acts as a generalized inverse; (2) A⁺AA⁺ = A⁺, meaning A⁺ is itself a generalized inverse of A⁺; (3) (AA⁺)ᵀ = AA⁺, meaning AA⁺ is symmetric; and (4) (A⁺A)ᵀ = A⁺A, meaning A⁺A is also symmetric. Any matrix satisfying all four conditions simultaneously is unique — that unique matrix is the Moore-Penrose pseudoinverse. No other matrix can satisfy all four at once.
How does the SVD relate to the pseudoinverse formula used in this calculator?
The Singular Value Decomposition writes A = UΣVᵀ where U and V are orthogonal and Σ = diag(σ₁, σ₂). The pseudoinverse is A⁺ = VΣ⁺Uᵀ, where Σ⁺ replaces each nonzero singular value with its reciprocal. For an invertible 2×2 matrix, both singular values are nonzero and Σ⁺ yields the ordinary inverse. For a rank-1 singular matrix, one singular value is zero and the formula reduces to Aᵀ divided by the squared Frobenius norm — exactly the Case 2 formula implemented here.
What is the difference between the pseudoinverse A⁺ and the ordinary inverse A⁻¹?
The ordinary inverse A⁻¹ exists only for square matrices with nonzero determinant. The pseudoinverse A⁺ exists for every matrix without exception. When A is invertible, A⁺ = A⁻¹ exactly — no information is lost. When A is singular, A⁻¹ is undefined but A⁺ still exists and provides the minimum-norm least-squares solution. The pseudoinverse thus strictly extends the ordinary inverse, inheriting all its properties in the invertible case while remaining well-defined in all other cases.
Can this calculator help solve an overdetermined or underdetermined linear system?
For 2×2 systems only: if A is invertible (det ≠ 0), the unique exact solution to Ax = b is x = A⁻¹b = A⁺b. If A is singular (det = 0), no exact solution may exist, but x⁺ = A⁺b gives the vector with smallest ‖x‖ that minimizes the residual ‖Ax − b‖². For example, with A = [[1, 2], [2, 4]] and b = [[1], [3]], computing A⁺b yields the minimum-norm approximate solution, directly applicable in two-variable regression or signal reconstruction problems.