# How to "quickly" solve the following linear system of equations?

I have the following system of equation $$(S)$$, where $$m$$ is a parameter in $$\mathbb{R}$$ $$(S) \begin{cases} (m-1)x+my+z=1\\ mx+2y+3z=3\\ (m+1)x+my+(m-1)z=m-1 \end{cases}$$ I've tried solving it using the Gauss pivot method but it is very long and takes a lot of calculation. Is there any other simpler way to find the solution ?

Solving a $$3 \times 3$$ just takes a certain amount of work. Here subtracting the first from the third gives $$2x+(m-2)z=m-2$$ and adding the first and third gives $$2mx + 2my + mz=m$$ If $$m \neq 0$$ you can divide it out. If $$m=0$$ you will be an equation short.

$$(S) \begin{cases} (m-1)x+my+z=1\\ mx+2y+3z=3\\ (m+1)x+my+(m-1)z=m-1 \end{cases}$$

No need for heavy calculus. Simple inspection obviously gives $$\begin{cases} x=0 \\ y=0 \\ z=1 \end{cases}$$

NOTE :

The above result is true any value of $$m$$.

But if $$\quad\left|\left|\begin{matrix} m-1 & m & 1 \\ m & 2 & 3 \\ m+1 & m & m-1 \end{matrix}\right|\right| =m^2(4-m)=0\quad$$ ,

that is if $$m=0$$ or $$m=4$$ , the three equations are not linearly independent.

Then they are an infinity of solutions.