Why is it that we can do these operations without changing the original stystem? I was given the matrix: $$\left[\begin{matrix}1&3&0&-2&-7\\0&1&0&3&6\\0&0&1&0&2\\0&0&0&1&-2\end{matrix}\right]$$ And I was told to continue the row operations to solve the solution for the original system. So for the first step I subtracted $3R_4$, where $R_4$ is row $4$, to get rid of the $x_2$ in the original system. To get: $$\left[\begin{matrix}1&3&0&-2&-7\\0&1&0&0&12\\0&0&1&0&2\\0&0&0&1&-2\end{matrix}\right]$$ Then what I did was $R_1-3R_2$ to get rid of the $x_2$:
$$\left[\begin{matrix}1&0&0&-2&-43\\0&1&0&0&12\\0&0&1&0&2\\0&0&0&1&-2\end{matrix}\right]$$Then lastly $R_1+2R_4$ to get rid of the $x_4$ in $R_1$
$$\left[\begin{matrix}1&0&0&0&-47\\0&1&0&0&12\\0&0&1&0&2\\0&0&0&1&-2\end{matrix}\right]$$I'm curious as to why were able to do this to a matrix. It seems like these manipulations to the rows would make it different. It's strange to me that we can add a constant times another row to get a new, replacement row. Is there any theory behind this, or is it just that simple that we can just change it?
Edit: I changed the question from "did I do this right to" a "why can we do this" just so theres no confusion about the current comments.
 A: Yes, you are right.It is correct :)
A: We can add a constant multiple ($k$) of a row to another without changing the system's solutions because $A=B$ and $C=D$ if and only if $A+kC=B+kD$ and $C=D$.
Similarly, we can multiply a row by $k\neq 0$ without changing the solutions because $A=B$ if and only if $kA=kB$.
A: Answer to the 'why' it works part of the question. There are three kinds of what are called elementary row operations on an augmented matrix to solve a system of linear equations of this form. 
They are 


*

*Interchange two rows.  (not needed for your question). To undo this, in the new matrix just interchange the same two rows to get back to the original matrix.

*Multiply a row by a nonzero constant.  (not needed for your question). To undo this, in the new matrix divide the same row by that constant to get back to the original matrix.

*Add a multiple of one row,say row i, from a different row, say row j. (you did this correctly twice). To undo this, subtract the same multiple of the new row i from the new row j. 
Since you can undo each of these operations and the rows represent linear equations, all of the matrices you produce will correspond to linear systems of equations with the same solutions as the original system.
