Homework - ERO with Unknown in Matrix I was having a problem with how to properly perform elementary row operation (ERO) on a matrix.
In the question, we were given an augmented matrix $\begin{bmatrix}1&1&-1&1\\2&3&a&3\\1&a&3&2\end{bmatrix}$ and require us to determine all possible values of $a$ such that the system is


*

*consistent with infinitely many solution

*consistent with one and only one solution

*inconsistent.



So I decided to make the matrix in row echelon form. Here are my steps:
1) $R_{3} - R_{1} \rightarrow R_{3}$
$\begin{bmatrix}1&1&-1&1\\2&3&a&3\\0&a-1&4&1\end{bmatrix}$
2) $R_{2} - 2R_{1} \rightarrow R_{2}$
$\begin{bmatrix}1&1&-1&1\\0&1&a+2&1\\0&a-1&4&1\end{bmatrix}$
3) $R_{3} - (a-1)R_{2} \rightarrow R_{3}$
$\begin{bmatrix}1&1&-1&1\\0&1&a+2&1\\0&0&4-(a+2)(a-1)&1-(a-1)\end{bmatrix}$
After I further simplify the matrix in step 3, I got $\begin{bmatrix}1 & 1 & -1 & 1 \\ 0 & 1 & a+2 & 1 \\ 0 & 0& (3+a)(2-a) & 2-a \end{bmatrix}$
With the simplified matrix, I have attempted to perform another ERO, $\frac{R_{3}}{2-a} \rightarrow R_{3}$ so that $\begin{bmatrix}1 & 1 & -1 & 1 \\ 0 & 1 & a+2 & 1 \\ 0 & 0& (3+a) & 1 \end{bmatrix}$. After this ERO, there will not be such a value that the system is consistent with infinitely many solutions, which is not same as the suggested answer. It appear that the ERO $\frac{R_{3}}{2-a} \rightarrow R_{3}$ is illegal.
I tried to check for the definition of ERO again, the textbook state that ERO include 


*

*interchange any 2 equations of a system of linear equation

*multiply both sides of any equation in a system by a non-zero scalar

*add a multiple of one equation to another equation within the system


Under this definition, it seems that my step 3 is also illegal as it include a unknown $a$ in the ERO. However, using the result of step 3, I can manage to get the correct answer.
So I want to know that is that we can only perform ERO with a constant value (e.g. $R_{3} - 6R_{1} \rightarrow R_{3}$) or we can perform ERO with variable (e.g. $R_{3} - (a-8)R_{2} \rightarrow R_{3}$) but with certain restriction?

Hint: consider what you have after your step 3 and the simplification, that is,
$\qquad\begin{bmatrix}1 & 1 & -1 & 1 \\ 0 & 1 & a+2 & 1 \\ 0 & 0& (3+a)(2-a) & 2-a \end{bmatrix}$


*

*If $a=2$, then …

*If $a=-3$, then …

*If $a\ne2$ and $a\ne 3$ then …

Explanation of the error
You can't do $\frac{R_{3}}{2-a} \rightarrow R_{3}$ unless you know that $a\ne 2$. So if you perform that operation, you must also consider the case $a=2$ separately.
