Add, subtract, multiply matrices, or find the determinant and inverse of a square matrix.
Strip away the notation and a matrix is just a grid of numbers — rows and columns, nothing more mystical than a small spreadsheet. What makes matrices useful isn't the grid itself, it's that mathematicians figured out consistent rules for adding, multiplying, and inverting these grids in ways that map onto real problems: rotating a 3D object in a video game, solving several equations at once, running the transformations behind a neural network, or balancing a system in physics or economics. This calculator handles the five operations you'll run into constantly — addition, subtraction, multiplication, determinant, and inverse — for matrices up to 5×5.
Adding or subtracting two matrices only works if they're the exact same size, and once that's true, it's the most intuitive operation in linear algebra: you just add or subtract each entry to the one sitting in the same position in the other matrix. No shortcuts, no special rules — position (1,1) combines with position (1,1), position (2,3) with position (2,3), and so on across the whole grid. If the dimensions don't match, the operation is undefined, full stop, which is why this calculator will flag a size mismatch rather than guess at what you meant.
Matrix multiplication doesn't work the way most people instinctively expect. You don't multiply matching positions together — instead, each entry in the result comes from taking a full row of matrix A, a full column of matrix B, multiplying corresponding entries, and adding them up. That also means the inner dimensions have to line up: if A is 2×3, B needs to be 3-something for the multiplication to even be defined, and the result takes the outer dimensions (2×whatever B's columns are). It's also not commutative — A × B usually isn't the same as B × A, which surprises people coming from ordinary number multiplication where order never matters.
These two only apply to square matrices (same number of rows and columns), and they're closely related. The determinant is a single number that captures something about how the matrix "scales space" — a determinant of zero means the matrix squashes everything into a lower dimension and can't be undone, which is exactly why a matrix with a zero determinant has no inverse. The inverse itself is the matrix equivalent of a reciprocal: multiply a matrix by its inverse and you get the identity matrix back, the matrix version of the number 1. Inverses show up constantly in solving systems of linear equations, since they let you isolate an unknown vector the same way dividing both sides of an equation isolates a variable.
This calculator is built for the actual arithmetic — punch in your numbers, pick your operation, and it'll handle the row-by-column bookkeeping that gets tedious and error-prone once you're past 2×2 or 3×3 by hand.