<s>[INST] Find the row echelon form of a 4x4 matrix I want to row reduce the following matrix into an echelon form:
\begin{pmatrix}
-(-\beta+\alpha)^{1/2} & 0 & 1 & 0\\ 
 0&  -(-\beta+\alpha)^{1/2}& 0 & 1\\ 
-\beta & \alpha &  -(-\beta+\alpha)^{1/2}&0 \\ 
\alpha & -\beta & 0 & -(-\beta+\alpha)^{1/2}
\end{pmatrix}
where $\beta = k(1/M + 1/m)$, $\alpha = k/m$
I have no idea. I have been sitting here in the library for two hours doing calculations like $-\beta + \alpha = -k/M$, trying to add rows together, having the $-(-\beta+\alpha)^{1/2} = -i\sqrt{k/M}$, letting $-(-\beta+\alpha)^{1/2} = \gamma$ and I just don't know anymore
 [/INST] Set $\gamma=-(-\beta+\alpha)^{1/2}$; then your matrix becomes
$$
\begin{pmatrix}
\gamma & 0 & 1 & 0\\ 
 0&  \gamma & 0 & 1\\ 
-\beta & \alpha &  \gamma &0 \\ 
\alpha & -\beta & 0 & \gamma
\end{pmatrix}
$$
Now, multiply the first row by $\gamma^{-1}$:
$$
\begin{pmatrix}
1 & 0 & \gamma^{-1} & 0\\ 
 0&  \gamma & 0 & 1\\ 
-\beta & \alpha &  \gamma &0 \\ 
\alpha & -\beta & 0 & \gamma
\end{pmatrix}
$$
Add to the third row the first multiplied by $\beta$; then add to the fourth row the first multiplied by $-\alpha$:
$$
\begin{pmatrix}
1 & 0 & \gamma^{-1} & 0\\ 
 0&  \gamma & 0 & 1\\ 
0 & \alpha &  \gamma+\beta\gamma^{-1} &0 \\ 
0 & -\beta & -\alpha\gamma^{-1} & \gamma
\end{pmatrix}
$$
Multiply the second row by $\gamma^{-1}$:
$$
\begin{pmatrix}
1 & 0 & \gamma^{-1} & 0\\ 
0 & 1 & 0 & \gamma^{-1}\\ 
0 & \alpha &  \gamma+\beta\gamma^{-1} &0 \\ 
0 & -\beta & -\alpha\gamma^{-1} & \gamma
\end{pmatrix}
$$
Add to the third row the second row multiplied by $-\alpha$; add to the fourth row the second row multiplied by $\beta$:
$$
\begin{pmatrix}
1 & 0 & \gamma^{-1} & 0\\ 
0 & 1 & 0 & \gamma^{-1}\\ 
0 & 0 &  \gamma+\beta\gamma^{-1} &-\alpha\gamma^{-1} \\ 
0 & 0 & -\alpha\gamma^{-1} & \gamma+\beta\gamma^{-1}
\end{pmatrix}
$$
Now observe that
$$
\gamma+\beta\gamma^{-1}=\frac{\gamma^2+\beta}{\gamma}=\alpha\gamma^{-1}
$$
Thus the matrix you got is
$$
\begin{pmatrix}
1 & 0 & \gamma^{-1} & 0\\ 
0 & 1 & 0 & \gamma^{-1}\\ 
0 & 0 &  \alpha\gamma^{-1} &-\alpha\gamma^{-1} \\ 
0 & 0 & -\alpha\gamma^{-1} & \alpha\gamma^{-1}
\end{pmatrix}
$$
Multiply the third row by $\alpha^{-1}\gamma$:
$$
\begin{pmatrix}
1 & 0 & \gamma^{-1} & 0\\ 
0 & 1 & 0 & \gamma^{-1}\\ 
0 & 0 &  1 & -1 \\ 
0 & 0 & -\alpha\gamma^{-1} & \alpha\gamma^{-1}
\end{pmatrix}
$$
Finally, add to the fourth row the third row multiplied by $\alpha\gamma^{-1}$:
$$
\begin{pmatrix}
1 & 0 & \gamma^{-1} & 0\\ 
0 & 1 & 0 & \gamma^{-1}\\ 
0 & 0 &  1 & -1 \\ 
0 & 0 & 0 & 0
\end{pmatrix}
$$
The reduced row echelon form is obtained now by adding to the first row the third row multiplied by $-\gamma^{-1}$:
$$
\begin{pmatrix}
1 & 0 & 0 & \gamma^{-1}\\ 
0 & 1 & 0 & \gamma^{-1}\\ 
0 & 0 &  1 & -1 \\ 
0 & 0 & 0 & 0
\end{pmatrix}
$$
Of course, this assumes that $\gamma\ne0$ (that is $\alpha\ne\beta$) and $\alpha\ne0$. Depending on your assumptions, these cases should be examined separately.
</s>