TITLE: Proof of elementary row operations for matrices?
QUESTION [27 upvotes]: I'm taking a Linear Algebra course, and we just started talking about matrices. So we were introduced to the elementary row operations for matrices which say that we can do the following:

Interchange two rows.
Multiply a row with a nonzero number.
Add a row to another one multiplied by a number. 

Now I understood from the lecture in class how to use these and all, but I want to understand the logic behind number 3. 
Is there a mathematical proof that shows that by adding row $R_1$ to row $R_2$ we are not changing the system of equations?
Thanks in advance

REPLY [11 votes]: Examples with only $2\times 2$ linear systems may be misleading, albeit illuminating.
Consider, for simplicity, only rows $R_1$ and $R_2$ of a matrix $A$ representing a linear system. When you change $R_2$ with the result of adding to it $R_1$ multiplied by $d$, the linear system changes, clearly every solution of the old system is a solution of the new one. Indeed, if $x_1$, $x_2$, $\dots$, $x_n$ are numbers such that
$$
a_{11} x_1 + a_{12} x_2 + \dots + a_{1n} x_n = c_1
$$
and
$$
a_{21} x_1 + a_{22} x_2 + \dots + a_{2n} x_n = c_2
$$
then
$$
(a_{21}+da_{11}) x_1 + (a_{22}+da_{12}) x_2 + \dots + (a_{2n}+da_{1n}) x_n = 
c_2 + dc_1
$$
Now, call $B$ the new matrix and apply to it the operation “sum to its second row the first one multiplied by $-d$”. Then the same reasoning applies and any solution of the system represented by $B$ is also a solution of the system represented by the resulting matrix.
But what's the resulting matrix? It's precisely $A$.
Thus the two systems have the same solution set.
The same reasoning applies when you do this in general, with the limitation of using two distinct rows. Otherwise you could end up with summing to a row its opposite, which is the same as multiplying the row by $0$, which is not a legal row operation.
For the same reasons, also the other two types of row operations don't change the solution set: they are reversible.
You'll learn that doing an elementary row operation on a matrix $A$ is the same as multiplying the matrix by a suitable invertible matrix, so the operation can be reversed simply by multiplying the resulting matrix by the inverse of the “elementary matrix” used beforehand.
This has the consequence that a matrix $A$ can be represented written as product of “simpler” matrices: some people write this as
$$
A=P^TLU
$$
where $P$ is a “permutation matrix” (corresponding to the swap row operations needed to bring $A$ in row echelon form), $L$ is lower triangular and $U$ is the row echelon form. Both $P$ and $L$ are invertible and it's really easy to write down their inverses. Such a decomposition has many applications because $P$, $L$ and $U$ carry information about $A$ in a easily usable format.