eMathHelp

## Questions

Home / Calculators / Linear Algebra Calculators

# Inverse of Matrix Calculator

Calculator finds inverse of matrix using Gaussian elimination method with steps shown.

Choose size of the matrix

Enter the elements of matrix or
Show steps

Solution

Your input is $A=\left[ \begin{array}{ccc} 2 & 1 & 1 \\\\ 1 & 0 & 3 \\\\ 1 & 1 & 0 \end{array} \right]$

To find inverse matrix augment it with identity matrix and perform row operations trying to make identity matrix to the left. Then to the right will be inverse matrix.

So, augment matrix with identity:

$\left[ \begin{array}{ccc|ccc}2&1&1&1&0&0 \\\\ 1&0&3&0&1&0 \\\\ 1&1&0&0&0&1\end{array}\right]$

Make zeros in column 1 except entry at row 1, column 1 (pivot entry).

Divide row 1 by $2$ $\left(R_1=\frac{R_1}{2}\right)$:

$\left[ \begin{array}{ccc|ccc}1&\frac{1}{2}&\frac{1}{2}&\frac{1}{2}&0&0 \\\\ 1&0&3&0&1&0 \\\\ 1&1&0&0&0&1\end{array}\right]$

Subtract row 1 from row 2 $\left(R_2=R_2-R_1\right)$:

$\left[ \begin{array}{ccc|ccc}1&\frac{1}{2}&\frac{1}{2}&\frac{1}{2}&0&0 \\\\ 0&- \frac{1}{2}&\frac{5}{2}&- \frac{1}{2}&1&0 \\\\ 1&1&0&0&0&1\end{array}\right]$

Subtract row 1 from row 3 $\left(R_3=R_3-R_1\right)$:

$\left[ \begin{array}{ccc|ccc}1&\frac{1}{2}&\frac{1}{2}&\frac{1}{2}&0&0 \\\\ 0&- \frac{1}{2}&\frac{5}{2}&- \frac{1}{2}&1&0 \\\\ 0&\frac{1}{2}&- \frac{1}{2}&- \frac{1}{2}&0&1\end{array}\right]$

Make zeros in column 2 except entry at row 2, column 2 (pivot entry).

Add row 2 to row 1 $\left(R_1=R_1+R_2\right)$:

$\left[ \begin{array}{ccc|ccc}1&0&3&0&1&0 \\\\ 0&- \frac{1}{2}&\frac{5}{2}&- \frac{1}{2}&1&0 \\\\ 0&\frac{1}{2}&- \frac{1}{2}&- \frac{1}{2}&0&1\end{array}\right]$

Add row 2 to row 3 $\left(R_3=R_3+R_2\right)$:

$\left[ \begin{array}{ccc|ccc}1&0&3&0&1&0 \\\\ 0&- \frac{1}{2}&\frac{5}{2}&- \frac{1}{2}&1&0 \\\\ 0&0&2&-1&1&1\end{array}\right]$

Multiply row 2 by $-2$ $\left(R_2=\left(-2\right)R_2\right)$:

$\left[ \begin{array}{ccc|ccc}1&0&3&0&1&0 \\\\ 0&1&-5&1&-2&0 \\\\ 0&0&2&-1&1&1\end{array}\right]$

Make zeros in column 3 except entry at row 3, column 3 (pivot entry).

Divide row 3 by $2$ $\left(R_3=\frac{R_3}{2}\right)$:

$\left[ \begin{array}{ccc|ccc}1&0&3&0&1&0 \\\\ 0&1&-5&1&-2&0 \\\\ 0&0&1&- \frac{1}{2}&\frac{1}{2}&\frac{1}{2}\end{array}\right]$

Subtract row 3 multiplied by $3$ from row 1 $\left(R_1=R_1-\left(3\right)R_3\right)$:

$\left[ \begin{array}{ccc|ccc}1&0&0&\frac{3}{2}&- \frac{1}{2}&- \frac{3}{2} \\\\ 0&1&-5&1&-2&0 \\\\ 0&0&1&- \frac{1}{2}&\frac{1}{2}&\frac{1}{2}\end{array}\right]$

Add row 3 multiplied by $5$ to row 2 $\left(R_2=R_2+\left(5\right)R_3\right)$:

$\left[ \begin{array}{ccc|ccc}1&0&0&\frac{3}{2}&- \frac{1}{2}&- \frac{3}{2} \\\\ 0&1&0&- \frac{3}{2}&\frac{1}{2}&\frac{5}{2} \\\\ 0&0&1&- \frac{1}{2}&\frac{1}{2}&\frac{1}{2}\end{array}\right]$

As can be seen we obtained identity matrix to the left. So, we are done.

Answer: $A^{-1}=\left[ \begin{array}{ccc} \frac{3}{2} & - \frac{1}{2} & - \frac{3}{2} \\\\ - \frac{3}{2} & \frac{1}{2} & \frac{5}{2} \\\\ - \frac{1}{2} & \frac{1}{2} & \frac{1}{2} \end{array} \right]$

Decimal form: $A^{-1}=\left[ \begin{array}{ccc} 1.5 & -0.5 & -1.5 \\\\ -1.5 & 0.5 & 2.5 \\\\ -0.5 & 0.5 & 0.5 \end{array} \right]$