Math Tools

Matrix Calculator: Multiply, Determinant, Inverse

Multiply two matrices, add or subtract them, or find the determinant, inverse or transpose of a matrix, up to 10 × 10. Type each matrix one row per line with the numbers separated by spaces or commas.

01

Your inputs

Start with the example, or enter your own values.

Processed in your browser. Your inputs stay on this device.

02

Your result

A little clarity, coming right up.

Make room for the answer.

Enter your values and run the tool. Your result will appear here.

How to use the Matrix Calculator

Choose the operation, type matrix A (and B for multiply, add and subtract), one row per line, and press Calculate.

Read more: How to Use the Matrix Calculator: Steps and a Worked Example

Matrix multiplication

A × B is defined when A has as many columns as B has rows. Each entry is a row of A times a column of B, added up: for [1 2; 3 4] × [5 6; 7 8], the top left entry is 1 × 5 + 2 × 7 = 19. Order matters: A × B is usually not B × A.

Determinant and inverse

The determinant of [a b; c d] is ad − bc; for [1 2; 3 4] it is −2. A square matrix has an inverse only when its determinant is not 0, and A × A⁻¹ gives the identity matrix.

Typing matrices

Write one row per line, or separate rows with semicolons: 1 2; 3 4. Every row must have the same number of values. Decimals and negative numbers are fine.

How it works

Product: each entry is a row of A times a column of B. Determinant and inverse by Gaussian elimination.

Examples

  • With the default values
    A × B:
    19  22
    43  50

Limitations and assumptions

Numbers are shown with up to 6 decimals. For the inverse and transpose, matrix B is ignored.

Frequently asked questions

Can I multiply a 2 × 3 by a 3 × 2 matrix?

Yes, and the result is 2 × 2.

Why does the inverse fail?

The matrix is singular: its determinant is 0, so it has no inverse.

How big can the matrices be?

Up to 10 rows and 10 columns.