Matrix Calculator

Perform matrix addition, multiplication, inverse, determinant, and transpose operations. Supports up to 10x10 matrices. Free online matrix calculator.

How to Use

  1. Set matrix dimensions

    Define the number of rows and columns for your matrix.

  2. Enter matrix values

    Fill in each cell of the matrix. For two-matrix operations, enter the second matrix as well.

  3. Select operation and calculate

    Choose the desired operation and click Calculate to see the result matrix.

What is a Matrix?

A matrix is a rectangular array of numbers, used as a tool to handle systems of equations, linear transformations, and data transformations as a single block. An m×n matrix consists of m rows and n columns, and the value at each position is called an element.

A square matrix, where the number of rows equals the number of columns, is especially important because it can have a determinant and an inverse. This calculator supports six operations: the determinant, inverse, transpose, and scalar multiplication of a single matrix, plus addition and multiplication between two matrices.

Key Applications

  • Linear transformations such as rotation and scaling in computer graphics
  • Solving systems of linear equations and regression analysis in statistics
  • Weight computations in machine learning, and structural analysis in engineering

Calculation Formulas

2×2 determinant: det(A) = ad - bc (A = [[a,b],[c,d]]). Example: for [[1,2],[3,4]], 1×4 - 2×3 = 4 - 6 = -2.

Inverse matrix: A⁻¹ = adj(A) / det(A). For a 2×2 matrix, A⁻¹ = (1/det)·[[d,-b],[-c,a]]. The inverse of the example above is (1/-2)·[[4,-2],[-3,1]] = [[-2,1],[1.5,-0.5]].

Matrix multiplication: C[i][j] = Σ A[i][k]·B[k][j] — the number of columns in A must equal the number of rows in B. Transpose: Aᵀ[i][j] = A[j][i] swaps rows and columns. Determinants of 3×3 and larger matrices are computed recursively using Laplace (cofactor) expansion.

Frequently Asked Questions

What is a determinant?
The determinant is a scalar value defined for a square matrix, used to determine whether the matrix is invertible (whether an inverse exists). The determinant of a 2×2 matrix [[a,b],[c,d]] is ad-bc, and for 3×3 and larger matrices it is computed recursively using Laplace (cofactor) expansion. If the determinant is 0, no inverse exists.
When does an inverse matrix not exist?
An inverse does not exist when the determinant of a square matrix is 0; such a matrix is called a singular matrix. For example, [[1,2],[2,4]] has a determinant of 1×4-2×2=0, so it has no inverse. This happens when the rows (or columns) of the matrix are linearly dependent on each other.
Does the order of matrix multiplication matter?
Yes, matrix multiplication is not commutative. That is, A×B ≠ B×A. Also, for matrix multiplication to be possible, the number of columns in the first matrix must equal the number of rows in the second. For example, a (2×3) matrix and a (3×2) matrix can be multiplied, but (2×3) and (2×3) cannot.
What size of matrix can be calculated?
You can calculate matrices up to 10×10 in size. You can freely set the number of rows and columns, so addition, multiplication, and transpose of rectangular matrices are also supported. However, the determinant and inverse are only defined for square matrices, where the number of rows equals the number of columns.
What is a transpose used for?
A transpose is a matrix with its rows and columns swapped, defined by Aᵀ[i][j] = A[j][i]. Transposing an m×n matrix yields an n×m matrix. It is used in covariance calculations in statistics, reshaping data in machine learning, and determining whether a matrix is symmetric (A=Aᵀ).
What are the conditions for matrix addition?
Matrix addition is possible only when the two matrices have exactly the same dimensions (number of rows and columns), and elements at the same position are added (C[i][j] = A[i][j] + B[i][j]). Unlike multiplication, addition is commutative (A+B = B+A).
How is scalar multiplication calculated?
Scalar multiplication is the operation of multiplying every element of a matrix by the same number (scalar), computed as C[i][j] = k × A[i][j]. For example, multiplying [[1,2],[3,4]] by 3 gives [[3,6],[9,12]]. The size of the matrix remains unchanged.
How are decimal places in the results handled?
Decimals arising from division or accumulated sums in operations such as the inverse and multiplication are rounded and displayed to 10 decimal places. Thus, repeating decimals like 1/3 are shown as approximate values such as 0.3333333333, while integer results such as a determinant are displayed as-is.
Verified 2026 formulas

Related Calculators