Pseudoinverse Calculator

Compute the Moore-Penrose pseudoinverse of rectangular or singular matrices via SVD. Verify all four Moore-Penrose conditions with step-by-step details.

Matrix A (2×2)
Matrix Rank
0
Number of non-zero singular values (of 2 possible)
Singular Values
0.0000, 0.0000
From SVD: A = UΣVᵀ
Condition Number
σ_max / σ_min (effective)
‖A‖_F
0.0000
Frobenius norm of A
‖A⁺‖_F
0.0000
Frobenius norm of the pseudoinverse
Verify: A·A⁺·A ≈ A
✓ Passed
Moore-Penrose condition 1: should equal zero
Verify: A⁺·A·A⁺ ≈ A⁺
✓ Passed
Moore-Penrose condition 2: should equal zero
Pseudoinverse A⁺ (2×2)
0.00000.0000
0.00000.0000
Verification: A · A⁺ · A (should equal A)
0.00000.0000
0.00000.0000

Singular Values

σᵢValue1/σᵢ (used in A⁺)Magnitude
σ10.0000000 (truncated)
0.0%
σ20.0000000 (truncated)
0.0%

Moore-Penrose Conditions

ConditionFormulaStatus
1A · A⁺ · A = A✓ Satisfied
2A⁺ · A · A⁺ = A⁺✓ Satisfied
3(A · A⁺)* = A · A⁺Hermitian (see A·A⁺ above)
4(A⁺ · A)* = A⁺ · AHermitian (see A⁺·A)

SVD Computation Steps

1. Compute AᵀA

2. Find eigenvalues λᵢ of AᵀA: [0.0000, 0.0000]

3. Singular values σᵢ = √λᵢ: [0.0000, 0.0000]

4. Rank = 0 (non-zero σᵢ with tolerance)

5. Pseudoinverse: A⁺ = V · Σ⁺ · Uᵀ where Σ⁺ inverts non-zero σᵢ

Planning notes, formulas, and examples

About the Pseudoinverse Calculator

The Moore-Penrose pseudoinverse, denoted A⁺, is the most widely used generalized inverse. It exists for every matrix — square or rectangular, full rank or singular — and is uniquely defined by four conditions: A·A⁺·A = A, A⁺·A·A⁺ = A⁺, (A·A⁺)* = A·A⁺, and (A⁺·A)* = A⁺·A. When A is invertible, A⁺ reduces to the ordinary inverse A⁻¹.

The pseudoinverse is computed most reliably through the Singular Value Decomposition: given A = UΣVᵀ, the pseudoinverse is A⁺ = VΣ⁺Uᵀ, where Σ⁺ is formed by inverting the non-zero singular values and transposing the diagonal matrix. Singular values below a numerical tolerance are treated as zero to maintain stability, and the effective rank equals the number of retained singular values.

This calculator handles 2×2, 2×3, 3×2, and 3×3 matrices. Enter your matrix or load a preset to see the pseudoinverse, the SVD singular values, rank, condition number, and automatic verification of the Moore-Penrose conditions. The step-by-step breakdown shows exactly how the SVD is used to construct A⁺, making it ideal for students learning generalized inverses or engineers verifying least-squares solutions.

When This Page Helps

Regular matrix inversion fails for rectangular or singular matrices — but many practical problems (least squares regression, underdetermined systems, minimum-norm solutions) require a generalized inverse. The Moore-Penrose pseudoinverse provides the unique solution that minimizes the Euclidean norm and is used throughout statistics, control theory, signal processing, and machine learning. This calculator computes it via SVD with numerical safeguards and verifies correctness automatically.

How to Use the Inputs

  1. Select the matrix dimensions (2×2, 2×3, 3×2, or 3×3)
  2. Enter the matrix entries or click a preset to load an example
  3. View the pseudoinverse matrix in the result section
  4. Check the Moore-Penrose conditions in the verification outputs
  5. Examine the singular value table to understand the rank and condition
  6. Review the SVD computation steps for the complete algorithm
  7. Compare the pseudoinverse with the original matrix dimensions (A⁺ is n×m for an m×n matrix)
Formula used
A⁺ = VΣ⁺Uᵀ, where A = UΣVᵀ (SVD). Σ⁺ is formed by taking 1/σᵢ for non-zero singular values and 0 otherwise. For full-rank square matrices, A⁺ = A⁻¹.

Example Calculation

Result: A⁺ = [[0.04, 0.08], [0.08, 0.16]]

The matrix [[1,2],[2,4]] has rank 1 (singular), so the standard inverse does not exist. The pseudoinverse is computed via SVD: σ₁ = √20, σ₂ = 0. A·A⁺·A = A is verified numerically.

Tips & Best Practices

  • The pseudoinverse of a zero matrix is the zero matrix (transposed dimensions)
  • For overdetermined systems (more equations than unknowns), x = A⁺b gives the least-squares solution
  • For underdetermined systems (more unknowns than equations), x = A⁺b gives the minimum-norm solution
  • The pseudoinverse is continuous — small changes in A produce small changes in A⁺
  • In MATLAB use pinv(A); in NumPy use numpy.linalg.pinv(A)
  • The condition number σ_max/σ_min indicates numerical reliability of the pseudoinverse

SVD-Based Computation

The Singular Value Decomposition A = UΣVᵀ factorizes any m×n matrix into an m×m unitary U, an m×n diagonal Σ with non-negative singular values, and an n×n unitary V. The pseudoinverse Σ⁺ is the n×m matrix obtained by inverting each non-zero diagonal element and transposing. Then A⁺ = VΣ⁺Uᵀ. This method is numerically superior to the normal equation approach (AᵀA)⁻¹Aᵀ because it avoids squaring the condition number — the condition number of AᵀA is κ(A)², which makes the normal equations twice as sensitive to rounding errors.

Applications in Statistics and Data Science

Linear regression minimizes ‖Xβ − y‖₂, and the solution is β = X⁺y. In principal component analysis (PCA), the pseudoinverse reconstructs data from a reduced number of components. Ridge regression adds regularization by modifying the singular values: σᵢ → σᵢ/(σᵢ² + λ), which is equivalent to a "damped" pseudoinverse. Data scientists use the pseudoinverse implicitly every time they call `numpy.linalg.lstsq` or fit a linear model.

Rank-Deficient and Ill-Conditioned Matrices

When a matrix is rank-deficient, some singular values are zero (or effectively zero), and the standard inverse does not exist. The pseudoinverse handles this gracefully by inverting only the non-zero singular values. Choosing the numerical rank — how many singular values to retain — requires setting a tolerance, typically ε·σ_max·max(m,n) where ε is machine epsilon. Truncated SVD, where only the top k singular values are retained, provides a low-rank approximation whose pseudoinverse is more stable than the full pseudoinverse.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • It is the unique matrix A⁺ satisfying four conditions: A·A⁺·A = A, A⁺·A·A⁺ = A⁺, and both A·A⁺ and A⁺·A are Hermitian (self-adjoint). It exists for every matrix regardless of shape or rank.