Inverse of Matrix Calculator

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

Show Instructions
  • In general, you can skip multiplication sign, so `5x` is equivalent to `5*x`
  • In general, you can skip parentheses, but be very careful: e^3x is `e^3x` and e^(3x) is `e^(3x)`
  • Also be careful when you write fractions: 1/x^2 ln(x) is `1/x^2 ln(x)` and 1/(x^2 ln(x)) is `1/(x^2 ln(x))`
  • If you skip parentheses or multiplication sign, type at least whitespace, i.e. write sin x (or even better sin(x)) instead of sinx
  • Sometimes I see expressions like tan^2xsec^3x: this will be parsed as `tan^(2*3)(x sec(x))`. To get `tan^2(x)sec^3(x)`, use parentheses: tan^2(x)sec^3(x)
  • Similarly tanxsec^3x will be parsed as `tan(xsec^3(x))`. To get `tan(x)sec^3(x)`, use parentheses: tan(x)sec^3(x)
  • From table below you can notice, that sech is not supported, but you can still enter it using identity `sech(x)=1/cosh(x)`
  • If you get an error, double check your expression, add parentheses and multiplication signs, where needed, and consult the table below
  • All suggestions and improvements are welcomed. Leave them in comments
Following table contains supported operations and functions:
TypeGet
Constants
ee
pi`pi`
ii (imaginary unit)
Operations
a+ba+b
a-ba-b
a*b`a*b`
a^b, a**b`a^b`
sqrt(x), x^(1/2)`sqrt(x)`
cbrt(x), x^(1/3)`root(3)(x)`
root(x,n), x^(1/n)`root(n)(x)`
x^(a/b)`x^(a/b)`
abs(x)`|x|`
Functions
e^x`e^x`
ln(x), log(x)ln(x)
ln(x)/ln(a)`log_a(x)`
Trigonometric Functions
sin(x)sin(x)
cos(x)cos(x)
tan(x)tan(x), tg(x)
cot(x)cot(x), ctg(x)
sec(x)sec(x)
csc(x)csc(x), cosec(x)
Inverse Trigonometric Functions
asin(x), arcsin(x), sin^-1(x)asin(x)
acos(x), arccos(x), cos^-1(x)acos(x)
atan(x), arctan(x), tan^-1(x)atan(x)
acot(x), arccot(x), cot^-1(x)acot(x)
asec(x), arcsec(x), sec^-1(x)asec(x)
acsc(x), arccsc(x), csc^-1(x)acsc(x)
Hyperbolic Functions
sinh(x)sinh(x)
cosh(x)cosh(x)
tanh(x)tanh(x)
coth(x)coth(x)
1/cosh(x)sech(x)
1/sinh(x)csch(x)
Inverse Hyperbolic Functions
asinh(x), arcsinh(x), sinh^-1(x)asinh(x)
acosh(x), arccosh(x), cosh^-1(x)acosh(x)
atanh(x), arctanh(x), tanh^-1(x)atanh(x)
acoth(x), arccoth(x), cot^-1(x)acoth(x)
acosh(1/x)asech(x)
asinh(1/x)acsch(x)

Choose size of the matrix

Enter the elements of matrix or

Write all suggestions in comments below.

Solution

Your input: find inverse of $$$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]$$$