What does calculating the inverse of a matrix mean?

Matrix multiplication corresponds to substituting new variables for the given ones in the system of linear equations. In more detail, for a system of $n$ equations in $n$ unknowns $X_1,\dots ,X_n $, suppose that $A$ represents the system of equations. Suppose now that you introduce new variables $Y_1,\dots ,Y_n$ and you express each $X_i$ as a linear combination of the new variables. If you write $B$ for the matrix of coefficients of the $X_i$ represented as combinations of the $Y_i$, then the matrix $AB$ corresponds to the matrix of coefficients of the original system of equations after substituting the new variables in. If you work this out for the case $n=2$ it's easy to see what is going on. This in fact is one way to motivate the definition of matrix multiplication (in general, not just for square matrices).

Now, what all this tells you is that if you have $A$ and you found that $B=A^{-1}$ is its inverse, then if you introduce new variables $Y_1,\dots , Y_n$ and express the $X_i$ in terms of those by reading the coefficient in the inverse matrix $B$, then substituting these variables into the original system will result in a very very simple system. Namely, the coefficient after substituting will be the coefficients in $AB=I$. This is the simplest system in the world. So, find the inverse of a matrix is equivalent to finding a change of coordinates, from the $X_i$'s to the $Y_i$'s, which make the system of equations particularly nice.

Again, this holds true for all systems, not just $n\times n$.


Let us organize our equations in this way:

$x\begin {bmatrix} 1 \\ 3 \\ \vdots \\ 0 \end{bmatrix}$ + $y\begin {bmatrix} 2 \\ 8 \\ \vdots \\ 4 \end{bmatrix}$ + $z\begin {bmatrix} 1 \\ 1 \\ \vdots \\ 1 \end{bmatrix}$ = $\begin {bmatrix} 2 \\ 12 \\ \vdots \\ 2 \end{bmatrix}$

When you have done inverse we got:

$2\begin {bmatrix} 2/5 \\ -3/10 \\ \vdots \\ 6/5 \end{bmatrix}$ + $12\begin {bmatrix} 1/5 \\ 1/10 \\ \vdots \\ 2/5 \end{bmatrix}$ + $2\begin {bmatrix} -3/5 \\ 1/5 \\ \vdots \\ 1/5 \end{bmatrix}$ = $\begin {bmatrix} x \\ y \\ \vdots \\ z \end{bmatrix}$

Initially on right side we had $[2 \ 12 \ 2 ]^T$. Using inverse, we want to place $[x \ y \ z ]^T$ on right side.

An another way is to think $[2 \ 12 \ 2 ]^T$ as a point represented using three vectors $[1 \ 3 \ 0 ]^T$, $[2 \ 8 \ 4 ]^T$, $[1 \ 1 \ 1 ]^T$. $x,y,z$ was the scaling factors. Now we transformed same point into $[x \ y \ z ]^T$ using vectors associated with column vectors of $A^{-1}$.


Let's look at your original three equations.

$$x+2y+z=2$$ $$3x+8y+z=12$$ $$4y+z=2$$


Now let's multiply by $\frac{2}{5}$, $\frac{1}{5}$, and $\frac{-3}{5}$ respectively. We get

$$\frac{2x}{5}+\frac{4y}{5}+\frac{2z}{5}=\frac{4}{5}$$ $$\frac{3x}{5}+\frac{8y}{5}+\frac{z}{5}=\frac{12}{5}$$ $$\frac{-12y}{5}+\frac{-3z}{5}=\frac{-6}{5}$$

Now add the three equations together. We get

$$x + 0y + 0z = 2$$

or

$$x=2$$


Now multiply the same three equations by $\frac{-3}{10}$, $\frac{1}{10}$, and $\frac{1}{5}$ respectively. We get

$$\frac{-3x}{10}+\frac{-6y}{10}+\frac{-3z}{10}=\frac{-6}{10}$$ $$\frac{3x}{10}+\frac{8y}{10}+\frac{z}{10}=\frac{12}{10}$$ $$\frac{4y}{5}+\frac{z}{5}=\frac{2}{5}$$

Summing

$$0x + y + 0z = \frac{10}{10}$$

or

$$y = 1$$


Now multiply the same three equations by $\frac{6}{5}$, $\frac{-2}{5}$, and $\frac{1}{5}$ respectively. We get

$$\frac{6x}{5}+\frac{12y}{5}+\frac{6z}{5}=\frac{12}{5}$$ $$\frac{-6x}{5}+\frac{-16y}{5}+\frac{-2z}{5}=\frac{-24}{5}$$ $$\frac{4y}{5}+\frac{z}{5}=\frac{2}{5}$$

Summing

$$0x + 0y + z = \frac{-10}{5}$$

or

$$z = -2$$


And if you look at the numbers by which we multiplied, they are from

$$\begin{pmatrix} 2/5 & 1/5 & -3/5\\ -3/10 & 1/10 & 1/5\\ 6/5 & -2/5 & 1/5 \end{pmatrix} = A^{-1}$$

We essentially did the matrix multiplication of $A \cdot A^{-1}$ to get $I$ manually when we could have just done

$$\begin{pmatrix} x\\ y\\ z \end{pmatrix} = \begin{pmatrix} 2/5 & 1/5 & -3/5\\ -3/10 & 1/10 & 1/5\\ 6/5 & -2/5 & 1/5 \end{pmatrix}\begin{pmatrix} 2\\ 12\\ 2 \end{pmatrix}=\begin{pmatrix} 2\\ 1\\ -2 \end{pmatrix}$$

and gotten the same answer. $A^{-1}$ is essentially the numbers by which we multiply the equations so we can add them together and get the solutions. Solving for the inverse is determining those numbers. Of course, if you're working with the equations, it would be easier to substitute in than to come up with all nine numbers. The convenient thing here is that we don't have to multiply $A\cdot A^{-1}$, as we already know the result. We can just do the right side multiplication.