Add, subtract, multiply matrices. Calculate determinant, inverse, and transpose.
This Matrix Calculator performs the core operations of linear algebra directly in your browser: addition, subtraction, scalar and matrix multiplication, transpose, determinant, and inverse. You enter matrices by setting the number of rows and columns and typing each entry into the grid, then choose an operation to see the result matrix or scalar value instantly.
It is built for students and educators working through linear algebra, engineering, computer graphics, and statistics coursework. Because it accepts arbitrary numeric entries (including decimals and negatives) and reports determinants and inverses for square matrices, it is handy for checking homework, verifying by-hand row reduction, and confirming that a matrix is invertible before you rely on it.
Addition and subtraction operate element by element and require both matrices to share the same dimensions. Matrix multiplication (A x B) is defined only when the number of columns in A equals the number of rows in B; each result entry is the dot product of a row of A with a column of B, so an m x n matrix times an n x p matrix yields an m x p result. Multiplication is not commutative, meaning A x B generally differs from B x A.
The determinant is defined only for square matrices. For a 2x2 matrix [[a, b], [c, d]] it equals ad - bc; larger matrices are reduced via cofactor expansion or Gaussian elimination. The inverse exists only when the determinant is non-zero (a non-singular matrix); it satisfies A x A^-1 = I, the identity matrix. If the determinant is zero the matrix is singular and no inverse is reported. Because floating-point arithmetic is used, results for large or ill-conditioned matrices may show tiny rounding differences from exact fractions.
It supports addition, subtraction, scalar multiplication, matrix multiplication, transpose, determinant, and inverse. Determinant and inverse require a square matrix.
Matrix multiplication requires the number of columns in the first matrix to equal the number of rows in the second. If they do not match, the product is undefined and the calculator will not compute a result.
An inverse only exists for square matrices whose determinant is non-zero. If the determinant is zero the matrix is singular and has no inverse, so nothing is returned.
Yes. Each cell accepts any real number, including decimals and negatives, so you can work with measured data or fractions converted to decimal form.
The calculator uses floating-point arithmetic, which can introduce very small rounding errors on inverses and determinants of large or nearly-singular matrices. Round the displayed value to interpret it.
You can compute with any dimensions your device handles comfortably; small to medium matrices used in coursework compute instantly. Very large matrices may take longer and are more sensitive to rounding.
Yes, it is completely free and runs entirely in your browser. Your matrix entries are never uploaded to a server, so nothing you type leaves your device.