◎ English

Matrix Calculator

Choose the size, enter the entries and pick an operation: addition, subtraction, scalar multiple, product, transpose, determinant, inverse, rank or solving A·x = b. Decimals become fractions, so every result is exact.

Matrix A
Rows × Columns

Enter integers, decimals (0.5) or fractions (3/4). Results are exact fractions.

Examples

Calculations run in your browser; what you type is not sent to a server.

Result
A−1 =
001
−213
3−1−5

Step-by-step solution

  1. det(A)

    Rule of Sarrus: sum of the down-right diagonal products minus the sum of the down-left diagonal products

    Plus diagonals: (2)·(3)·(0) + (1)·(2)·(1) + (1)·(1)·(0) = 2

    Minus diagonals: (1)·(3)·(1) + (2)·(2)·(0) + (1)·(1)·(0) = 3

    det = 2 − (3) = −1

  2. Row-reduce [A | I] to [I | A⁻¹]

    211100
    132010
    100001
    1. R₁ ↔ R₂R₂ → R₂ − 2·R₁R₃ → R₃ − R₁

      132010
      0−5−31−20
      0−3−20−11
    2. R₂ → −15·R₂R₁ → R₁ − 3·R₂R₃ → R₃ + 3·R₂

      101535−150
      0135−15250
      00−15−35151
    3. R₃ → −5·R₃R₁ → R₁ − 15·R₃R₂ → R₂ − 35·R₃

      100001
      010−213
      0013−1−5

Guide: Matrix Calculator

Products

If A is m×n and B is n×p, A·B is m×p; entry (i, j) is the sum of products of row i of A with column j of B, and each sum is shown. Matrix multiplication is generally not commutative.

Inverse and determinant

Only square matrices with a non-zero determinant have inverses. For 2×2, A⁻¹ = (1/(ad − bc))·[d −b; −c a]; larger matrices are row-reduced from [A | I] to [I | A⁻¹] by Gauss–Jordan elimination.

Rank and systems

The rank is the number of non-zero rows after reduction to row echelon form. For A·x = b the augmented matrix [A | b] is reduced and the solution is classified as unique, none or infinite.

Worked examples

  • 2×2 product: A · B — 2×2
  • 3×3 inverse: A⁻¹ — inverse — 3×3
  • Rank: rank(A) — rank — 3×3 rank = 2
  • A·x = b: A·x = b — solve the system — 2×2

Frequently asked questions

When does a matrix have no inverse?

When its determinant is zero (a singular matrix) or when it is not square.

How are decimals handled?

They are converted to exact fractions (0.5 → 1/2) and all arithmetic is exact, so inverses have no rounding error.

What is the largest size?

Up to 6 rows and 6 columns, so the steps stay readable.

Related tools

Sources: OpenStax — College Algebra 2e, Systems of Equations and Matrices

What would you like to calculate?

Browse all calculators