Skip to main content
CalcChef

Matrix Calculator

Add, subtract and multiply matrices up to 10 × 10, or get the determinant, inverse, transpose, rank and row-reduced form. Answers are exact fractions. How it works

Use the Matrix Calculator

A + B
2×2 result

Result: A + B

68
1012

2 × 2 matrix. Fractions are exact, in lowest terms.

Enter one row per line, with values separated by spaces. Values may be decimals (2.5) or fractions (3/4). Arithmetic is exact; matrices up to 10 × 10 are supported.

About the Matrix Calculator

For A = [1 2; 3 4] the determinant is -2 and the inverse is [-2 1; 3/2 -1/2]. This matrix calculator adds, subtracts and multiplies matrices up to 10 × 10 and finds the transpose, determinant, inverse, rank and row-reduced form, with every result an exact fraction. For the inverse and the row-reduced form it can list every row operation, up to 5 × 5.

Determinant, rank and inverse of small matrices

Matrix ADeterminantRankInverse
[1 2; 3 4]-22[-2 1; 3/2 -1/2]
[2 1; 1 1]12[1 -1; -1 2]
[4 7; 2 6]102[3/5 -7/10; -1/5 2/5]
[1 2; 2 4]01None (singular)
[2 0 0; 0 3 0; 0 0 4]243[1/2 0 0; 0 1/3 0; 0 0 1/4]
[1 2 3; 0 1 4; 5 6 0]13[-24 18 5; 20 -15 -4; -5 4 1]
[1 2 3; 4 5 6; 7 8 9]02None (singular)
[1 2 3; 4 5 6; 7 8 10]-33[-2/3 -4/3 1; -2/3 11/3 -2; 1 -2 1]
[2 -1 0; -1 2 -1; 0 -1 2]43[3/4 1/2 1/4; 1/2 1 1/2; 1/4 1/2 3/4]
[1 1/2 1/3; 1/2 1/3 1/4; 1/3 1/4 1/5]1/21603[9 -36 30; -36 192 -180; 30 -180 180]

Rows are separated by semicolons here. In the tool, put each row on its own line.

Every operation on A = [1 2; 3 4] and B = [5 6; 7 8]

OperationResult
A + B[6 8; 10 12]
A − B[-4 -4; -4 -4]
A × B[19 22; 43 50]
B × A[23 34; 31 46]
2 × A[2 4; 6 8]
Transpose of A[1 3; 2 4]
Determinant of A-2
Inverse of A[-2 1; 3/2 -1/2]
Rank of A2
Row-reduced form of A[1 0; 0 1]

For B × A, type B’s values into the Matrix A box and A’s into Matrix B.

How to use this tool

  1. Type matrix A with one row per line and the values separated by spaces. A value can be a decimal such as 2.5 or a fraction such as 3/4.
  2. Type matrix B if the operation uses it. Only A + B, A − B and A × B do.
  3. Press the operation. For k × A, enter the number k in the field that appears.
  4. For the inverse or the row-reduced form, press Show steps to list each row operation and the matrix after it (up to 5 × 5).
  5. Switch between Fractions and Decimals, or press Copy to take the result as tab-separated text.

Frequently asked questions

How do you multiply two matrices?
Each cell of the product is a row of the first matrix times a column of the second, added up. For A = [1 2; 3 4] and B = [5 6; 7 8] the top-left cell is 1 × 5 + 2 × 7 = 19, and the whole product is [19 22; 43 50]. A has to have as many columns as B has rows.
Is A × B the same as B × A?
Usually not. With A = [1 2; 3 4] and B = [5 6; 7 8], A × B is [19 22; 43 50] and B × A is [23 34; 31 46].
How do I find the inverse of a 2 × 2 matrix?
For [a b; c d], swap a and d, change the signs of b and c, and divide every entry by the determinant ad − bc. For [4 7; 2 6] the determinant is 10, so the inverse is [3/5 -7/10; -1/5 2/5].
What does it mean when a matrix is singular?
Its determinant is 0, so it has no inverse. [1 2; 2 4] is singular because the second row is twice the first, and its rank is 1. [1 2 3; 4 5 6; 7 8 9] is singular too, with rank 2.
What is the rank of a matrix?
The number of pivots left after row reduction, which is the number of independent rows. The 2 × 3 matrix [1 2 3; 4 5 6] can have a rank of 2 at most, and it does: its row-reduced form is [1 0 -1; 0 1 2].
Can it solve a system of linear equations?
There is no equation solver, but the row-reduced form gets you there by hand. Type the augmented matrix, with the constants as the last column, and read the solution from the last column of the result. For x + 2y = 5 and 3x + 4y = 6, [1 2 5; 3 4 6] reduces to [1 0 -4; 0 1 9/2], so x = -4 and y = 9/2. That reading works when the left part reduces to the identity. A row 0 0 1 means no solution: x + y = 2 with 2x + 2y = 5 gives [1 1 0; 0 0 1]. A row of zeros means infinitely many: x + y = 2 with 2x + 2y = 4 gives [1 1 2; 0 0 0], and y is free.

Related Tools

View all tools