Matrix Calculator
Type one or two matrices, one row per line, and choose an operation: add, subtract, multiply, multiply by a number, determinant, inverse, transpose, rank, trace or row reduction. The arithmetic uses exact fractions, so an inverse comes out as fractions such as 3/2 and not as rounded decimals, and a switch shows decimals if you prefer them. Matrices up to 8 by 8 are accepted. Everything runs in your browser.
Type each matrix with one row per line and the entries separated by spaces or commas. Entries can be whole numbers, decimals or fractions such as 3/4, and the arithmetic is done on exact fractions, so an inverse comes out as fractions instead of rounded decimals. Adding and subtracting need two matrices of the same size, and A x B needs the number of columns of A to equal the number of rows of B. The determinant, inverse and trace need a square matrix, and a matrix whose determinant is 0 has no inverse. Rank is the number of pivots after row reduction. Matrices up to 8 by 8 are accepted. Everything is worked out in your browser and nothing is uploaded.
Related Tools
[5 suggestions]Fraction Calculator
Add, subtract, multiply and divide fractions, mixed numbers and decimals, simplify to lowest terms and see the steps.
Math & MoneyQuadratic Equation Solver
Solve ax^2 + bx + c = 0 for real or complex roots, with the discriminant, exact form, vertex and factored form.
Math & MoneySlope Calculator
Find the slope, equation, intercepts, distance and midpoint of the line through two points, with exact fractions.
Student ToolsArithmetic and Geometric Sequence Calculator
Find the nth term and the sum of an arithmetic or geometric sequence, the sum to infinity, the position of a value, or identify a list of numbers.
Student ToolsGCD and LCM Calculator
Find the greatest common divisor and least common multiple of two or more whole numbers, with the Euclidean algorithm steps.
Math & MoneyAbout the Matrix Calculator
A matrix is a rectangular grid of numbers. Two matrices can be added or subtracted when they have the same size, entry by entry. The product A x B is defined when A has as many columns as B has rows, and each entry is the sum of products of a row of A with a column of B, so the order matters: A x B is usually not B x A. The determinant of a square matrix is a single number: for the 2 by 2 matrix with rows 1 2 and 3 4 it is 1 x 4 - 2 x 3 = -2, and for the 3 by 3 matrix with rows 6 1 1, 4 -2 5 and 2 8 7 it is -306. A matrix has an inverse only when its determinant is not 0, and then the product of the matrix and its inverse is the identity matrix. The inverse of the matrix with rows 1 2 and 3 4 has rows -2 1 and 3/2 -1/2. The tool finds determinants and inverses by Gauss-Jordan elimination on exact fractions, with no rounding, so a result is exactly right or reported as having no inverse. The transpose swaps rows and columns. The rank is the number of independent rows, which equals the number of pivots after row reduction, and a square matrix has full rank exactly when it has an inverse. The trace is the sum of the diagonal. Row reduction gives the reduced row echelon form, which is used to solve systems of linear equations. Entries may be whole numbers, decimals or fractions. Nothing is uploaded.
How do I find the inverse of a matrix?▾
Choose Inverse, enter a square matrix, and the tool applies Gauss-Jordan elimination. The inverse of the matrix with rows 1 2 and 3 4 is the matrix with rows -2 1 and 3/2 -1/2. If the determinant is 0 the matrix has no inverse.
When can two matrices be multiplied?▾
When the number of columns in the first equals the number of rows in the second. A 2 by 3 matrix times a 3 by 2 matrix gives a 2 by 2 matrix. The tool tells you the sizes when they do not match.
What does a determinant of 0 mean?▾
The matrix is singular: its rows are linearly dependent, it has less than full rank and it has no inverse. For a system of equations it means there is no single unique solution.
Why does the tool show fractions?▾
It calculates with exact fractions, so nothing is lost to rounding. Tick Show decimals to see the same results as decimal numbers, rounded to 6 places.
Is my data uploaded?▾
No. The calculation runs in your browser and nothing is sent anywhere.