A matrix is a rectangular array of numbers.

The size of a matrix is its dimension, namely the number of rows and columns of the matrix.

For operations of matrices, please use the two calculators below.

To find inverse of matrix, you can also use the Gauss-Jordan Elimination method.

##### Matrix Multiplication, Addition and Subtraction Calculator
• Enter the dimension of the matrices. (Rows × Columns).
• For multiplication, the number of columns of the first matrix must be equal to the number of rows of the second matrix, i.e. (a × b)(b × c).
• For addition and subtraction, the dimensions of the two matrices must be the same.
• Maximum matrix dimension for this system is 9 × 9.
×
×

Please report any error to [email protected]
##### Matrix Inverse, Determinant and Adjoint Calculator
• For a matrix to be invertible, it must be a square matrix.
• Enter the dimension of the matrix. (Rows × Columns).
• Maximum matrix dimension for this system is 9 × 9.
• Result will be rounded to 3 decimal places.
×

Please report any error to [email protected]

#### Matrix Operations

##### Addition and Subtraction of Matrices

If matrices $A$ and $B$ are of the same size,

• the sum $A+B$ is the matrix obtained by adding the entries of $B$ to the corresponding entries of $A$.
• the difference $A-B$ is the matrix obtained by subtracting the entries of $B$ from the corresponding entries of $A$.

If $A=\left(\begin{array}{cccc}{a}_{11}& {a}_{12}& \text{…}& {a}_{1n}\\ {a}_{21}& {a}_{22}& \text{…}& {a}_{2n}\\ \text{⋮}& \text{⋮}& \text{⋱}& \text{⋮}\\ {a}_{m1}& {a}_{m2}& \text{…}& {a}_{mn}\end{array}\right)$ and $B=\left(\begin{array}{cccc}{b}_{11}& {b}_{12}& \text{…}& {a}_{1n}\\ {b}_{21}& {b}_{22}& \text{…}& {a}_{2n}\\ \text{⋮}& \text{⋮}& \text{⋱}& \text{⋮}\\ {b}_{m1}& {b}_{m2}& \text{…}& {b}_{mn}\end{array}\right)$

$A+B=\left(\begin{array}{cccc}{a}_{11}+{b}_{11}& {a}_{12}+{b}_{12}& \text{…}& {a}_{1n}+{b}_{1n}\\ {a}_{21}+{b}_{21}& {a}_{22}+{b}_{22}& \text{…}& {a}_{2n}+{b}_{2n}\\ \text{⋮}& \text{⋮}& \text{⋱}& \text{⋮}\\ {a}_{m1}+{b}_{m1}& {a}_{m2}+{b}_{m2}& \text{…}& {a}_{mn}+{b}_{mn}\end{array}\right)$

$A-B=\left(\begin{array}{cccc}{a}_{11}-{b}_{11}& {a}_{12}-{b}_{12}& \text{…}& {a}_{1n}-{b}_{1n}\\ {a}_{21}-{b}_{21}& {a}_{22}-{b}_{22}& \text{…}& {a}_{2n}-{b}_{2n}\\ \text{⋮}& \text{⋮}& \text{⋱}& \text{⋮}\\ {a}_{m1}-{b}_{m1}& {a}_{m2}-{b}_{m2}& \text{…}& {a}_{mn}-{b}_{mn}\end{array}\right)$

Matrices of different sizes cannot be added or subtracted.

Example:

If $A=\left(\begin{array}{cc}1& 2\\ 0& -3\end{array}\right)$ and $B=\left(\begin{array}{cc}3& 1\\ -1& 2\end{array}\right)$

$A+B=\left(\begin{array}{cc}1& 2\\ 0& -3\end{array}\right)+\left(\begin{array}{cc}3& 1\\ -1& 2\end{array}\right)=\left(\begin{array}{cc}4& 3\\ -1& -1\end{array}\right)$

$A-B=\left(\begin{array}{cc}1& 2\\ 0& -3\end{array}\right)-\left(\begin{array}{cc}3& 1\\ -1& 2\end{array}\right)=\left(\begin{array}{cc}-2& 1\\ 1& -5\end{array}\right)$

##### Multiplication of Matrices

If $A$ is an $m×r$ matrix and $B$ is an $r×n$ matrix, the product $AB$ is an $m×n$ matrix whose entry from row $i$ and column $j$ is the sum of the products of the corresponding entries from row $i$ of $A$ and column $j$ of $B$.

The entry ${\left(AB\right)}_{ij}$ in row $i$ and column $j$ of $AB$ is given by

${\left(AB\right)}_{ij}={a}_{i1}{b}_{1j}+{a}_{i2}{b}_{2j}+\text{…}+{a}_{ir}{b}_{rj}$

Matrices $A$ and $B$ can only be multiplied if the number of columns of $A$ is the same as the number of rows of $B$.

Example:

$A=\left(\begin{array}{ccc}1& 2& 1\\ 0& -3& 2\end{array}\right)$ and $B=\left(\begin{array}{cccc}3& 1& 0& 1\\ -1& 2& 3& 0\\ 0& -2& 1& 1\end{array}\right)$

$AB=\left(\begin{array}{ccc}1& 2& 1\\ 0& -3& 2\end{array}\right)\left(\begin{array}{cccc}3& 1& 0& 1\\ -1& 2& 3& 0\\ 0& -2& 1& 1\end{array}\right)=\left(\begin{array}{cccc}1& 3& 7& 2\\ 3& -10& -7& 2\end{array}\right)$

• The element at row 1 and column 1 of $AB$ is obtained from summing up the product of corresponding entries of row 1 of $A$ and column 1 of $B$, i.e.
${\left(AB\right)}_{11}=\left(1\right)\left(3\right)+\left(2\right)\left(-1\right)+\left(1\right)\left(0\right)=1$
• The element at row 1 and column 2 of $AB$ is obtained from summing up the product of corresponding entries of row 1 of $A$ and column 2 of $B$, i.e.
${\left(AB\right)}_{12}=\left(1\right)\left(1\right)+\left(2\right)\left(2\right)+\left(1\right)\left(-2\right)=3$
• The element at row 2 and column 1 of $AB$ is obtained from summing up the product of corresponding entries of row 2 of $A$ and column 1 of $B$, i.e.
${\left(AB\right)}_{21}=\left(0\right)\left(3\right)+\left(-3\right)\left(-1\right)+\left(2\right)\left(0\right)=3$
• And so on

##### Inverse of a Matrix

The inverse of a square matrix $A$ is the matrix ${A}^{-1}$ such that $A{A}^{-1}=I$

Example:

If $A=\left(\begin{array}{cc}-3& 2\\ 5& -4\end{array}\right)$, then ${A}^{-1}=\left(\begin{array}{cc}-2& -1\\ -2.5& -1.5\end{array}\right)$

because $A{A}^{-1}=\left(\begin{array}{cc}-3& 2\\ 5& -4\end{array}\right)\left(\begin{array}{cc}-2& -1\\ -2.5& -1.5\end{array}\right)=\left(\begin{array}{cc}1& 0\\ 0& 1\end{array}\right)$

One way to get the inverse of a square matrix $A$ is to use the following formula

${A}^{-1}=\frac{\mathrm{adj}\left(A\right)}{\mathrm{det}\left(A\right)}$

If the determinant of the matrix is 0, the matrix doesn't have an inverse and it's called a singular matrix.

Another way to find the inverse of a matrix is to append an identity matrix on the right side of the matrix then use the Gauss-Jordan Elimination method to reduce the matrix to its reduced row echelon form.

Confused and have questions? We’ve got answers. With Chegg Study, you can get step-by-step solutions to your questions from an expert in the field. If you rather get a 1:1 study help, try 30 minutes of free online tutoring with Chegg Tutors.