Skip to content

Matrix Calculator

Enter matrices in the grid editor (or as [[1,2],[3,4]]). Determinants show cofactor expansion, inverses show Gauss–Jordan elimination, and every result is verified (for example A·A⁻¹ = I).

Size×

How to use the matrix calculator

  1. Choose an operation.
  2. Set the size and fill in the entries.
  3. Review each row operation.

Examples

det [[1,2],[3,4]]

Answer: −2

inverse [[2,1],[1,3]]

Answer: (1/5)[[3,−1],[−1,2]]

What the matrix calculator does

Enter one or two matrices and add, subtract or multiply them, or find the determinant, inverse, transpose, rank or reduced row echelon form (RREF). Every operation is shown step by step with exact fractions, not rounded decimals.

Key operations

  • Addition and subtraction: entry by entry. Both matrices must be the same size.
  • Multiplication : entry is row of dotted with column of . must have as many columns as has rows. In general .
  • Determinant of a : . Larger ones use cofactor expansion or row reduction.
  • Inverse of a : . It exists only if .

Worked example: multiplying

Worked example: inverse

For : , so

Check: ✓

Solving systems with matrices

A system can be solved as , or by row-reducing the augmented matrix to RREF. RREF also tells you when there are no solutions or infinitely many.

Common mistakes

  • Multiplying entry by entry. That's not matrix multiplication.
  • Assuming .
  • Trying to invert a matrix with determinant 0 (a singular matrix).
  • Row operations: you may swap rows, scale a row by a non-zero number, and add a multiple of one row to another. Nothing else.

Matrices are used in computer graphics (rotations and scaling), economics (input-output models), statistics (regression) and anywhere you solve many linear equations at once.

In real life: rotating an image

To rotate a point by an angle around the origin, computer graphics multiply it by a rotation matrix:

Rotating by 90° (, ):

Games and photo apps do this for millions of pixels or vertices every second. Combining a rotation and a scaling is just one matrix multiplied by another, which is why graphics cards are built to multiply matrices fast.

Formulas

Practice problems

Try each one first, then open the answer to check your work.

  1. 1.Add .

    Show answer

    .

  2. 2.Find .

    Show answer

    . .

  3. 3.Multiply .

    Show answer

    .

  4. 4.Find the inverse of .

    Show answer

    . The determinant is 1.

  5. 5.Can a matrix be multiplied by a matrix?

    Show answer

    No. The first needs 3 columns to match 3 rows, but the second has only 2 rows.

Key terms

Matrix
A rectangular array of numbers in rows and columns.
Determinant
A number from a square matrix that tells you if it has an inverse.
Inverse
The matrix with .
Transpose
The matrix with its rows and columns swapped.
Rank
The number of linearly independent rows (or columns).

Frequently asked questions

When is a matrix not invertible?

When its determinant is 0 (the matrix is singular).

What size is the result of a matrix product?

An matrix times an matrix gives an matrix. The inner numbers must match.

What is the identity matrix?

A square matrix with 1s on the diagonal and 0s elsewhere. Multiplying by it leaves a matrix unchanged, like multiplying a number by 1.

What is RREF used for?

Reduced row echelon form solves systems of equations, finds the rank, and shows whether a matrix is invertible.

Can I enter fractions or decimals?

Yes. The calculator keeps fractions exact throughout, so results like don't turn into rounded decimals.