Moore Penrose Inverse Calculator

Paste your matrix and choose display precision below. Get pseudoinverse plus quality checks and exports. Works for tall, wide, and singular matrices safely today.

Calculator
Matrix size limit: 12×12 for quick, reliable computation.
Set the number of matrix rows.
Set the number of matrix columns.
Controls rounding in the displayed output.
Scientific helps when values span many magnitudes.
Auto works with commas, semicolons, or whitespace.
Higher can improve accuracy for harder matrices.
Used to decide which singular values count as zero.
Use 0 for the exact Moore–Penrose inverse.
Compute residuals for the four Penrose conditions.

Matrix input
Enter exactly 3 lines, each with 2 numbers.
Grid editor
Tip: After filling the grid, press “Grid → Text” to sync.
Example data table
This sample uses a 3×2 matrix and its 2×3 pseudoinverse.
Example A (3×2)
12
34
56
Example A+ (2×3)
-1.33333333 -0.33333333 0.66666667
1.08333333 0.33333333 -0.41666667
Formula used

The Moore–Penrose pseudoinverse A+ is defined as the unique matrix that satisfies the four Penrose conditions: A A+ A = A, A+ A A+ = A+, (A A+)ᵀ = A A+, and (A+ A)ᵀ = A+ A.

This calculator computes A+ using an SVD-style approach built from a symmetric eigen-decomposition: if AᵀA = V Σ² Vᵀ, then A+ = V Σ+ Uᵀ with U = A V Σ⁻¹. Small singular values σ below a tolerance are treated as zero.

How to use this calculator
  1. Set the matrix size using Rows and Columns.
  2. Paste your matrix values into the textarea, one row per line.
  3. Choose the separator, precision, and number format if needed.
  4. Enable Quality checks to verify the Penrose conditions numerically.
  5. Press Compute pseudoinverse to show results above this form.
  6. Use Download CSV or Download PDF to export the output.

Where the Moore–Penrose inverse fits in practice

The pseudoinverse extends the idea of an inverse to matrices that are not square. For an overdetermined system (m>n), it returns the least‑squares solution x = A+ b that minimizes ‖Ax−b‖. For an underdetermined system (m<n), it returns the minimum‑norm solution, useful when many solutions exist but you want the smallest ‖x‖. In regression, calibration, and signal reconstruction, it also forms projection matrices A A+ and A+ A that separate fitted components from residual structure.

Rectangular and singular inputs handled consistently

This calculator accepts any m×n matrix up to 12×12 for fast interactive use. When the matrix is rank‑deficient, classical inversion fails, yet A+ remains well defined through singular values. Entries that would explode due to near‑zero singular values are safely filtered using a tolerance, so results remain interpretable even for ill‑conditioned data. Input supports spaces, commas, semicolons, and tabs; the grid editor reduces row mistakes.

Tolerance, iterations, and optional damping

Computation is built from a symmetric eigen‑decomposition, controlled by Jacobi iterations (20–300, default 80) and a base tolerance (default 1e‑12). The effective cutoff is scaled by matrix size and the largest singular value, so “zero” adapts to the problem. Optional damping λ>0 replaces 1/σ with σ/(σ²+λ²), reducing noise sensitivity in near‑singular cases. If you expect measurement noise, start with small λ such as 1e‑3 to 1e‑1, then compare residuals and solution stability.

Reading rank and Penrose residuals

Estimated rank counts singular values above the tolerance. Enable Quality checks to compute four Frobenius‑norm residuals for the Penrose conditions: A A+ A≈A, A+ A A+≈A+, and the symmetry of A A+ and A+ A. Residuals near 0 (often around 1e‑10 to 1e‑14 for well‑scaled inputs) indicate a reliable pseudoinverse. Larger residuals can signal scaling problems; rescaling columns to similar magnitudes often improves numerical behavior.

Using exports in reports and pipelines

After you compute A+, the download buttons export both the input and pseudoinverse. CSV is ideal for spreadsheets and scripts, while the PDF produces a clean, monospaced snapshot for documentation. Pair the exported A+ with your b vectors to reproduce least‑squares fits, compare model sensitivity, or validate numerical results across tools with confidence today.

FAQs

1) What does the pseudoinverse return?

It returns A+, the unique matrix that satisfies the four Penrose conditions. It generalizes inversion to rectangular or singular matrices and supports least‑squares and minimum‑norm solutions.

2) When is A+ the same as the ordinary inverse?

If A is square and full‑rank, then A+ equals A⁻¹. In that case, all singular values are nonzero and the Penrose conditions reduce to standard inverse identities.

3) How should I set the tolerance?

Start with the default base tolerance and adjust only if needed. Increase it when near‑zero singular values cause unstable outputs; decrease it if you know the matrix is well scaled and you need more rank sensitivity.

4) What is the purpose of damping λ?

Damping stabilizes solutions for ill‑conditioned matrices by reducing amplification of small singular values. It uses σ/(σ²+λ²) instead of 1/σ, which often yields smoother, less noise‑sensitive results.

5) Why aren’t the residual checks exactly zero?

Floating‑point arithmetic and rounding introduce small errors, especially for poorly scaled matrices. Residuals near machine precision are expected; large residuals suggest conditioning or scaling issues in the input.

6) What input sizes are supported here?

The interface is optimized for matrices up to 12×12 to keep computation responsive in a browser session. You can still paste data quickly using separators or the grid editor.

Related Calculators

Row Reduction RREF CalculatorDiagonalization Checker CalculatorLU Decomposition Steps CalculatorQR Decomposition Steps Calculatormatrix calculator with variablesGauss-Jordan inverse calculatorPolynomial linear independence calculatorLinear independence of matrix calculatorComplex matrix inverse calculatorQR decomposition least squares

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.