Matrix Operations Calculator


This online Matrix Operations Calculator is designed to perform basic operations with two matrices. It calculates the sum, difference and product of two given matrices. You can paste the matrices copied from a spreadsheet or csv-file or enter manually using comma or space as separators between matrix elements. Each row of a matrix must end with a newline character (\n or enter). All the rows of a matrix must be of the same length, otherwise the matrix is considered incomplete. Before performing calculations, please click ‘Check Matrix’ button to check the matrix for completeness and align its columns.


Precision: decimal places

Matrix A


Matrix B


Matrix C


Basic Operations with Matrices

This matrix calculator performs basic operations with two given matrices. It includes the following calculators:

Matrix addition calculator. The sum \(C\) of two m-by-n matrices \(A\) and \(B\) is calculated according to the obvious formula: \(c_{i,j} = a_{i,j} + b_{i,j}\), where \(1 ≤ i ≤ m\) and \(1 ≤ j ≤ n\).

Properties of matrix addition

• Matrix addition is commutative: \(A+B=B+A.\)

• Matrix addition is associative: \((A + B) + C = A + (B + C).\)

• The transpose of a sum of matrices is the sum of the transposes of the factors: \({ (A+B) }^{ T }={ A }^{ T }+{ B }^{ T }.\)

Matrix subtraction calculator. The same as the above matrix addition calculator, but instead of addition, subtraction is performed.

Matrix multiplication calculator. Multiplication of two matrices \(A\) and \(B\) is defined if the number of columns of the left matrix \(A\) is the same as the number of rows of the right matrix \(B\). If \(A\) is an m-by-n matrix and \(B\) is an n-by-k matrix, then their matrix product, \(C\) = \(A\)\(B\), is the m-by-k matrix whose elements are given by product of the corresponding row of \(A\) and the corresponding column of \(B\):
$$c_{i,j} = a_{i,1}b_{1,j} + a_{i,2}b_{2,j} + \cdots + a_{i,n}b_{n,j} = \sum_{p=1}^n a_{i,p}b_{p,j},$$ where \(1 ≤ i ≤ m\) and \(1 ≤ j ≤ k\).

Properties of matrix multiplication

• Matrix multiplication is NOT commutative: \(AB≠BA.\) An exception is the case when one of the matrices is a square matrix and the second one is identity matrix \(I\) of the same size. An identity matrix is a square matrix in which all the elements on the main diagonal are equal to \(1\) and all other elements are equal to \(0\).

• Matrix multiplication is associative: \((AB)C=A(BC).\)

• Matrix multiplication is distributive: \(C(A+B)=CA+CB\) and \((A+B)C=AC+BC.\)

• The transpose of a product of matrices is the product, in the reverse order, of the transposes of the factors: \({ (AB) }^{ T }={ B }^{ T }{ A }^{ T }.\)


Related calculators

Check out our other algebra calculators such as Matrix Calculator or 3×3 System of Linear Equations Calculator.