Loona Calculators
Loona Calculators › Maths › Matrix Calculator

🔢 Matrix Calculator

Enter two matrices (2×2 or 3×3) and add, subtract or multiply them — or compute the determinant and inverse of matrix A on its own. Singular matrices are reported honestly when no inverse exists.

Quick answer: For a 2×2 matrix [[a, b], [c, d]], the determinant is ad − bc, and if it is not zero the inverse is (1 ÷ (ad − bc)) × [[d, −b], [−c, a]]. This calculator also handles 3×3 matrices with cofactor expansion.

Matrix A

Matrix B

How to use the Matrix Calculator

  1. Choose the size: 2×2 or 3×3.
  2. Type the values of matrix A (and B for two-matrix operations).
  3. Pick the operation: A + B, A − B, A × B, determinant of A, or inverse of A.
  4. Read the result matrix — determinants and inverses state clearly when a matrix is singular.
Example: A = [[1, 2], [3, 4]] has determinant 1×4 − 2×3 = −2, and its inverse is [[−2, 1], [1.5, −0.5]]. Multiply A by that inverse and you get the identity matrix [[1, 0], [0, 1]].

Frequently Asked Questions

How is matrix multiplication different from adding?

Addition matches cell to cell. Multiplication combines rows of A with columns of B: each result cell is a sum of products, so A × B is generally not the same as B × A.

When does a matrix have no inverse?

When its determinant is zero — the matrix is called singular. It squashes space into a lower dimension, so the transformation cannot be undone, and this calculator reports that instead of inventing an answer.

What is the determinant in plain words?

A single number that measures how much the matrix scales areas (or volumes in 3×3). A determinant of −2 means areas double and flip orientation.

Can I do bigger matrices?

This tool covers 2×2 and 3×3, which handle the great majority of school, college and everyday engineering problems.

Related Calculators

%

Percentage Calculator

Maths

📊

Statistics Calculator

Maths

½

Fraction Calculator

Maths

🧮

Equation Solver

Maths

🔬

Scientific Calculator

Maths

📐

Average Calculator

Maths

How it works — the formula

Determinant (2×2): det [[a, b], [c, d]] = ad − bc. Determinant (3×3): cofactor expansion along the first row. Inverse: A⁻¹ = adjugate(A) ÷ det(A), computed here by Gauss–Jordan elimination — the same result, with exact handling of the singular case (det = 0 means no inverse). Multiplication: (AB)ᵢⱼ = the dot product of row i of A with column j of B.

Worked example

Inputs: A = [[1, 2, 3], [0, 1, 4], [5, 6, 0]].

Steps (determinant): Expand along the first row: 1 × (1×0 − 4×6) − 2 × (0×0 − 4×5) + 3 × (0×6 − 1×5) = 1 × (−24) − 2 × (−20) + 3 × (−5) = −24 + 40 − 15 = 1.

Result: det(A) = 1, and since the determinant is 1 the inverse has whole numbers: [[−24, 18, 5], [20, −15, −4], [−5, 4, 1]]. Multiplying A by it gives the 3×3 identity matrix.

Embed this calculator on your website — free

Add this calculator to your own website or blog — it is completely free, needs no sign-up, and always shows the latest version. Copy the code below and paste it into your page where you want the calculator to appear. Keeping the small “Powered by Loona Automation” credit line under the embed helps keep this tool free — but you are free to style or remove it; the tool works either way.