Perform matrix addition, subtraction, multiplication, scalar multiplication, determinant, inverse, transpose and rank in one tool.
Frequently asked questions
Which operations does this calculator support?
Addition (A+B), subtraction (A−B), multiplication (A×B), scalar multiplication (k·A), determinant, inverse, transpose and rank. Sizes from 2×2 up to 5×5 (depending on the operation).
When does matrix multiplication work?
Two matrices can be multiplied only if the number of columns of A equals the number of rows of B. A of size m×n multiplied by B of size n×p produces a matrix of size m×p.
Why is the determinant only for square matrices?
The determinant is defined only for square matrices (same number of rows and columns). For non-square matrices it does not exist; use rank instead to characterise the matrix.
When is a matrix invertible?
A square matrix A has an inverse if and only if its determinant is non-zero. If det(A) = 0, the matrix is singular and no inverse exists. This calculator warns you when that happens.
How is the rank computed?
The rank is calculated by reducing the matrix to row echelon form using Gaussian elimination and counting the non-zero rows. It equals the number of linearly independent rows (or columns).
Can I enter negative numbers, decimals or fractions?
Yes. Each cell accepts any real number, positive or negative, with a decimal point (for example -3.5 or 0.25). Fractions should be entered as their decimal form.
Results are computed in double precision. Very small values close to zero may appear due to floating-point rounding.
This matrix calculator combines eight common linear-algebra operations into a single interactive tool: addition and subtraction of matrices of equal size, multiplication of compatible matrices, scalar multiplication, determinant, inverse, transpose and rank. Choose an operation from the tabs, pick the matrix size (up to 5×5 for most operations), and fill in the cells. Quick presets let you load the identity matrix, a zero matrix, random integers or an example pattern.
For multiplication, the calculator enforces the rule that columns of A must equal rows of B and shows the resulting m x p matrix. The determinant is computed by cofactor expansion for 2×2 and 3×3 and by LU decomposition for 4×4. Inverses are found with Gauss-Jordan elimination and the tool warns when a matrix is singular. Rank is obtained from Gaussian row reduction. Example: det of ((1,2),(3,4)) = 1*4 – 2*3 = -2; its inverse is ((-2,1),(1.5,-0.5)).