# Assumptions in Gauss-Jordan Elimination and how they affect solution?

Suppose we have the the following matrix system where all entries in $M$ and $N$ are in $\mathbb{R}$,

$$\underbrace{\begin{bmatrix} m_1 & m_2 \\ m_3 & m_4 \end{bmatrix}}_{M}\begin{bmatrix} a \\ b \end{bmatrix} =\underbrace{\begin{bmatrix} n_1 \\ n_2 \end{bmatrix}}_N$$

When using Gauass-Jordan elimination to solve for $a$ and $b$ we augment the system as,

$$\begin{bmatrix} m_1 & m_2 & |\hspace{0.1cm}n_1 \\ m_3 & m_4 &|\hspace{0.1cm} n_2 \end{bmatrix}$$

Then, for example, we reduce the element at $(2, 1)$ we can take $R_2 \leftarrow R_2 - \frac{m_3}{m_1}R_1$. However, do this we must assume the $m_2$ is non - zero.

My question is, why can we do this and still produce an answer for $(a, b$) in terms of $n_i$'s and $m_i$'s that will still have an answer when one or many $m_i$'s $= 0$?

When a particular $m_k$ you need is zero, you can permute the rows which does not alter the solution.
If all needed rows feature $m_k=0$ at this index $k$, what can you conclude?
Second, you are right to question this. The answer is that you $cannot$ always perform the same row operations on different matrices due to these division by 0 issues you point out. Unfortunately, if you want to write down a generic solution for a system of equations, you can do so, but you must include several cases to account for when some of the coefficients (i.e., $m_i$'s and $n_i$'s) are equal to $0$.