Another thread has talked about the purpose of a matrix. Dr. Math roughly summarized it as:
A matrix is just a compact notation, which allows you to specify several linear equations at once without having to write them all out. For example, instead of writing
3x + 4y + 5z = 7 2x - 3y + 6z = 6 2x + 5y - 9z = 11I can write the same thing more compactly using matrices:
$$ \begin{bmatrix} 3 & 4 & 5\\ 2 & -3 & 6\\ 2 & 5 & -9\\ \end{bmatrix} \begin{bmatrix}x\\ y\\ z\\ \end{bmatrix} = \begin{bmatrix}7\\ 6\\ 11\\ \end{bmatrix} $$
However, it seems that the more obvious way to do it would be:
$$ \begin{array}{ll} \begin{bmatrix} x & y & -z\\ \end{bmatrix} \\ \begin{bmatrix} 3 & 4 & 5\\ 2 & -3 & 6\\ 2 & 5 & -9\\ \end{bmatrix} = \begin{bmatrix}7\\ 6\\ 11\\ \end{bmatrix} \end{array} $$
Why are matrices written in a seemingly more complex way than the alternative?
What's the advantage of doing so?
For the purposes of writing equations compactly, your method may be better, but this is not the only purpose.
The real answer is that Dr. Math (and your teacher) aren't telling you everything there is to know about matrices. There's a lot more to linear algebra than expressing systems of linear equations. A matrix is a handy way to represent a "linear transformation," which is a function with some special properties. Solving equations like the one you posted is essentially the same thing as finding a vector $v$ so that $T(v)=w$, where $T$ is the linear transformation, and $w$ is the thing you have on the right side of the equation.
Notice that in the notation above, $T$ looks like a function being applied to $v$. That's because it is. If we think of $T$ as a matrix, and $v$ as the vector $\left(\substack{x\\ y\\ z}\right)$, then we want to mirror the function notation, so we write the vector to the right of the matrix.