Matrix Calculator: Multiply, Add, Transpose, Determinant and Inverse With Steps

Type a matrix as 1 2; 3 4 and pick an operation. You get the answer in exact fractions, the row-times-column working for multiplication, the rank and RREF with every row operation, and a 2×2 transformation view that shows what the matrix does to the plane. Nothing is rounded, so the answer matches the one in your textbook.

Matrix Calculator

Pick a tab, type your numbers and press Calculate. Tap an example chip to see the working first.

What a Matrix Is and What You Can Do With It

A matrix is a rectangle of numbers arranged in rows and columns. A matrix with m rows and n columns is an m×n matrix. The name was coined by James Joseph Sylvester in 1850, and Arthur Cayley wrote the first full algebra of matrices in 1858. Today they sit underneath computer graphics, machine learning, economics models and every system of linear equations.

OperationRuleWhen it exists
A + B, A − BAdd or subtract matching entriesSame size
kAMultiply every entry by kAlways
A × BRow of A dotted with column of BColumns of A = rows of B
AᵀSwap rows and columnsAlways
AⁿA multiplied by itself n timesA square
Rank, RREFRow-reduce to pivotsAlways

Matrix Multiplication, Step by Step

Multiplication is the operation that confuses people, because it is not entry by entry. Entry cij of A×B is the dot product of row i of A with column j of B.

Multiply two 2×2 matricesTry it in the calculator ↑

[[1, 2], [3, 4]] × [[5, 6], [7, 8]]

  1. c₁₁ = 1·5 + 2·7 = 19.
  2. c₁₂ = 1·6 + 2·8 = 22.
  3. c₂₁ = 3·5 + 4·7 = 43.
  4. c₂₂ = 3·6 + 4·8 = 50.

Answer: [[19, 22], [43, 50]]

Now swap the order. B×A is [[23, 34], [31, 46]], a different matrix. Matrix multiplication is not commutative, which is the single most important difference from ordinary numbers. The size rule matters too: a 2×3 matrix times a 3×2 matrix gives a 2×2 matrix, while the other order gives 3×3.

Rank and Row Reduction

Row reduction (Gaussian elimination) uses three legal moves: swap two rows, multiply a row by a nonzero number, and add a multiple of one row to another. Repeat until each pivot is 1 with zeros above and below, which is reduced row echelon form (RREF). The number of pivots is the rank.

Rank of a singular matrixTry it in the calculator ↑

[[1, 2, 3], [4, 5, 6], [7, 8, 9]]

  1. R₂ → R₂ − 4R₁ gives [0, −3, −6]. R₃ → R₃ − 7R₁ gives [0, −6, −12].
  2. R₃ is now twice R₂, so one more step makes it all zeros.
  3. Two pivots remain.

Answer: Rank 2, nullity 1. The rows are dependent, so the determinant is 0.

Put a column of constants on the right and the same method solves a system of equations. In the calculator, choose “Augmented [A | b]” and it tells you whether the system has one solution, none or infinitely many.

Seeing a Matrix: the 2×2 Transformation View

Every 2×2 matrix is a machine that moves the plane. Its first column is where the point (1, 0) lands, and its second column is where (0, 1) lands. The unit square becomes a parallelogram, and the area of that parallelogram is the absolute value of the determinant.

MatrixWhat it doesDeterminant
[[2, 0], [0, 2]]Scales everything by 24
[[0, −1], [1, 0]]Rotates 90° anticlockwise1
[[0, 1], [1, 0]]Reflects in the line y = x−1
[[1, 2], [2, 4]]Squashes the plane onto a line0

The Matrix calculator draws exactly this. Hover the pink parallelogram to read its area.

Where Matrices Do Real Work

  • Fibonacci numbers: the matrix [[1, 1], [1, 0]] raised to the power n holds Fn+1, Fn, Fn−1. Try A⁵ and you get [[8, 5], [5, 3]].
  • Computer graphics: every rotation, scale and shear of a 3D model is a matrix multiplication.
  • Search engines: Google’s original PageRank algorithm treats the web as a giant matrix of links.
  • Cost of multiplying: the school method needs n³ multiplications for two n×n matrices. Strassen showed in 1969 that this can be beaten, and the best known exponent is now about 2.37.

What We Think Is Overrated, Underrated and Wrong

Overrated: multiplying 3×3 matrices by hand again and again. Do it twice to learn the pattern, then let a tool do it and spend the time understanding what the product means.
Underrated: checking sizes first. Writing “2×3 times 3×2 gives 2×2” before any arithmetic removes most dimension errors, and the calculator shows the same check.
Wrong: “A × B = B × A”. We ran the example above both ways and the answers differ in all four entries.

Order Matters in Matrix Multiplication

Let A = [[1, 2], [3, 4]] and B = [[0, 1], [1, 0]]. Then AB = [[2, 1], [4, 3]] and BA = [[3, 4], [1, 2]]. Different results, so matrix multiplication is not commutative. The rule is that an m × n matrix can multiply an n × p matrix and gives m × p; if the inner numbers differ the product does not exist.

Our Take: What Is Overrated, Underrated and Plain Wrong

Overrated: hand-multiplying 3×3 matrices. Understand it once, then let software do it.

Underrated: checking dimensions before multiplying. It catches the most common mistake in one line.

Plain wrong: multiplying element by element. That is the Hadamard product, not matrix multiplication.

Matrix Mistakes That Cost Marks

  • Multiplying entry by entry instead of row by column.
  • Ignoring the size rule: columns of the first must equal rows of the second.
  • Assuming AB = BA.
  • Squaring a matrix by squaring each entry. A² means A × A.
  • Forgetting that only square matrices have powers, traces and determinants.

Why Students Get Stuck on Matrices, and What a Good Calculator Should Do

Searching for help with matrices usually starts late at night with one problem that will not work out. Sizes must match, and multiplication is not commutative. A good calculator fixes that by showing each step, checking its own answer and explaining the idea in plain words. This section covers what students struggle with, what they want, and how this page responds.

In short: students need to know which operation is allowed and carry it out without slips, not just see a final number, and a calculator earns trust only when its steps can be checked.

Understand the frustrations and desires

What they feel, and what they want

Each frustration points to a wish: a clearer step, a built-in check, an explanation in plain words.

  • Wants the size check shown first
  • Wants each multiplied entry written out
  • Wants transpose, determinant and inverse in one place

Build the page around their intent

Each intent has a place on this page

The page follows intent, not features, so each need has a clear starting point.

  • I need an answer now: type the problem into the calculator at the top of this page.Multiply [[1,2],[3,4]] by [[5,6],[7,8]]
  • I need to understand: the sections below explain the idea in plain words and list the common mistakes.
  • I need to check my work: every step is shown, so the first line that differs from yours is the one to study.
  • I need practice: open the solver, tap + and choose Create Practice Test.
  • I need it explained aloud: in the solver, tap + and choose Create Video.

Matrix: Questions People Ask

How do you multiply two matrices?

Take each row of the first matrix, multiply it by each column of the second entry by entry, and add. The result at row i, column j is that sum.

Why can’t I multiply some matrices?

The number of columns of the first matrix must equal the number of rows of the second. A 2×3 times a 2×3 is undefined.

What is the rank of a matrix?

The number of pivots after row reduction, which equals the number of independent rows (or columns).

Does matrix multiplication commute?

No. In general AB and BA are different, and one may exist when the other does not.

How do I solve a system of equations with a matrix?

Write the coefficients and constants as an augmented matrix and row-reduce. Use the “Row reduce & rank” tab.

Are the answers exact?

Yes. Entries are stored as fractions, so 1/3 stays 1/3 and nothing is rounded.

How do I multiply two matrices?

Each entry is the dot product of a row of the first matrix with a column of the second.

When can I add matrices?

Only when they have the same dimensions. Add entry by entry.

What is the transpose of a matrix?

Flip it over the main diagonal so rows become columns.

Why is AB not equal to BA?

Matrix multiplication composes transformations, and the order of transformations changes the result.

↑