Pseudoinverse Calculator

By: Calculator Grid

Pseudoinverse calculator

Compute the Moore – Penrose pseudoinverse of a real square or rectangular matrix, inspect numerical rank, and verify the defining identities.

Matrix 3×2 Output 2×3 Rank 2 Residual 2.51e – 15

Ready to export the current example as a validated workbook.

Matrix input

Use decimal-point notation. Every cell is required.

Matrix A3 rows × 2 columns

Live result

The matrix updates as you type.

Pseudoinverse A⁺
2 × 3 matrix
A⁺ Column 1 Column 2 Column 3
Row 1 – 0.342105 – 0.157895 0.552632
Row 2 0.289474 0.210526 – 0.236842
Estimated rank2 of 2
Largest singular value6.808868
Penrose residual2.51e – 15

Full-rank 3 × 2 matrix. The 2 × 3 pseudoinverse is ready.

Singular values

Values above the numerical tolerance contribute to A⁺.

Index Singular value Status
σ₁ 6.808868 Retained
σ₂ 1.280359 Retained

The cutoff scales with matrix size and the largest singular value. Values at or below the cutoff are treated as numerically zero.

Moore – Penrose checks

Smaller residuals indicate that the four defining identities are satisfied more closely.

Identity Frobenius residual Interpretation
AA⁺A = A 2.40e – 15 Within numerical precision
A⁺AA⁺ = A⁺ 5.93e – 16 Within numerical precision
(AA⁺)ᵀ = AA⁺ 2.72e – 16 Within numerical precision
(A⁺A)ᵀ = A⁺A 8.24e – 16 Within numerical precision

Residuals are diagnostic floating-point errors, not extra inputs. They are calculated from the same current matrix and pseudoinverse shown above.

How to use the pseudoinverse calculator

What this calculator does

This calculator finds the Moore – Penrose pseudoinverse, written A⁺, for a real matrix A. Unlike an ordinary inverse, the pseudoinverse exists for square, rectangular, singular, and rank-deficient matrices. It is especially useful when a linear system has no exact solution or has many solutions: multiplying by A⁺ gives the least-squares solution and, when several least-squares solutions exist, the one with minimum Euclidean norm. The result is a numerical estimate based on floating-point arithmetic. It does not prove that measured data are correct, choose a statistical model for you, or replace a domain-specific assessment of whether a least-squares model is appropriate.

When to use it

  • Check a homework or engineering calculation involving a non-square matrix.
  • Prepare the matrix step in a linear least-squares fit, calibration, or regression workflow.
  • Compare an invertible matrix's ordinary inverse with its pseudoinverse.
  • Inspect whether a matrix is numerically rank-deficient through its singular values and retained rank.

How to calculate

The calculator opens with a complete 3 × 2 demonstration matrix and an immediately available example workbook. To replace that example:

  1. Choose Matrix size. The first number is the row count and the second is the column count. Changing the size rebuilds the entry grid and preserves values that still fit.
  2. Enter every Matrix A cell in row-by-row order. Use ordinary decimal-point notation such as 4, -2.5, or .125. Commas, fractions, scientific notation, and unit symbols are rejected so that ambiguous pasted values cannot be silently reinterpreted.
  3. Read Pseudoinverse A⁺ and the diagnostic outputs. The output dimensions are reversed: an m × n input produces an n × m pseudoinverse.
  4. Select Download Excel to create a fresh workbook from the current validated controls. The workbook includes the inputs, pseudoinverse, singular values, rank, and four residual checks.

Reset clears the demonstration entries, returns Matrix size to 3 × 2, removes calculated content, and disables Download Excel until every required matrix entry is valid again. Reset does not restore the opening example.

Input guide

Matrix size is a required choice expressed as rows × columns. Available sizes range from 2 × 2 to selected rectangular and square layouts up to 5 × 5. For example, choose 3 × 2 for three equations and two unknown coefficients. A larger selection adds required cells and increases the output dimensions; a smaller selection removes cells that no longer fit. A common mistake is reversing rows and columns – the first number always describes how many horizontal rows you will enter.

Matrix A entries are required finite real numbers with no unit. Each label Aᵢ,ⱼ identifies row i and column j. A realistic value is A₁,₂ = 3. Positive, negative, zero, and fractional decimals are allowed, with absolute values limited to 10¹² to avoid unstable overflow. Changing one entry can alter every element of A⁺, the singular values, rank, and residuals. Do not paste thousands separators such as 1,000; commas are intentionally rejected rather than guessed as decimal or grouping marks.

Output guide

The summary pills labeled Matrix and Output show the current input and pseudoinverse shapes. Rank shows the number of singular directions retained under the numerical tolerance. Residual shows the largest of the four Moore – Penrose identity errors.

Pseudoinverse A⁺ is the primary result. Each table value is a dimensionless matrix element displayed to six decimal places, while the workbook keeps the underlying numeric value. A zero entry can be exact or the rounded display of a very small number. Large values often indicate weakly constrained directions or poor conditioning rather than a calculation failure.

Estimated rank reports retained rank out of the maximum possible rank, min(rows, columns). A lower first number means the matrix is numerically rank-deficient. Largest singular value measures the strongest scaling direction in A; it is not a probability or percentage. Penrose residual is the largest Frobenius-norm discrepancy among the four defining identities. Values near machine precision are expected for well-scaled inputs; larger values can appear for extreme scales or ill-conditioned matrices.

The Singular values table lists Index, Singular value, and Status. “Retained” means the value is above the adaptive cutoff and contributes reciprocally to A⁺; “Treated as zero” means it is too small relative to the dominant scale. The Moore – Penrose checks table lists Identity, Frobenius residual, and Interpretation for AA⁺A = A, A⁺AA⁺ = A⁺, and the two symmetry conditions. These are verification diagnostics, not separate approximations of the matrix.

Worked example

The opening matrix is A = [1, 3], [2, 4], [3, 3][ – 0.342105, – 0.157895, 0.552632], [0.289474, 0.210526, – 0.236842]