🧮
calculator

Matrix Calculator

Perform matrix operations including addition, subtraction, multiplication, determinant, inverse, and transpose.

matrix calculatormatrix multiplicationmatrix determinantmatrix inverse calculator

Matrix calculator

Perform matrix operations online

Add, subtract, multiply matrices or calculate determinant, inverse, and transpose.

Matrix A

Matrix B

How to use

How to perform matrix operations

  1. 1 Select the matrix size — 2×2, 3×3, or 4×4. Both matrices will use the same dimensions.
  2. 2 Choose an operation: addition (A+B), subtraction (A−B), multiplication (A×B), determinant, inverse, or transpose of matrix A.
  3. 3 Enter values into the matrix grids. Use the Random Fill button to populate both matrices with test values.
  4. 4 Click Calculate to see the result. For scalar results like determinant, the value is displayed prominently. For matrix results, the output matrix is shown in a table.
  5. 5 Change the operation or values and recalculate as needed. The Clear button resets all inputs to zero.

Matrices are fundamental to linear algebra, used extensively in computer graphics, machine learning, physics simulations, and engineering. This calculator supports the most common matrix operations for square matrices up to 4×4. Addition and subtraction operate element-wise — each cell in the result is the sum or difference of the corresponding cells in matrices A and B.

Matrix multiplication is not element-wise. Each cell in the result matrix is computed as the dot product of the corresponding row from A and column from B. This operation is not commutative: A×B generally produces a different result than B×A. The calculator follows the standard matrix multiplication algorithm.

The determinant is a scalar value that indicates whether a matrix is invertible and describes the scaling factor of the linear transformation the matrix represents. A determinant of zero means the matrix is singular and has no inverse. The inverse of a matrix A, denoted A⁻¹, is the matrix that satisfies A×A⁻¹ = I (the identity matrix). The calculator uses cofactor expansion for determinants and the adjugate method for computing inverses.

More Calculator tools

Related tools

You might also like