Given \begin{align} x-2y &= 4\tag1\label1 \\ 2x+3y &= 1 \tag2\label2 \end{align}
One method I know of solving for x and y: elimination by making coefficients the same
$2 \times \eqref{1}:$
$$2x-4y=8\tag3\label3$$
$\eqref{3}-\eqref{2}:$
$$(2x-2x)-4y-3y=8-1\tag4\label4$$
$$-7y=7$$
$$y=-1$$ Sub $y=-1$ into $\eqref{1}$ then $$x=2$$
What are other ways of solving these simultaneous equations? And can you demonstrate your way also.
Matrices can be used to re-write $n$ simultaneous equations with $n$ unknowns.
Let's take your example: $$x-2y=4$$ $$2x+3y=1$$ These can be re-written in matrix form as follows: $$\begin{bmatrix} 1 & -2 \\ 2 & 3 \\ \end{bmatrix} \begin{bmatrix} x\\ y\\ \end{bmatrix} = \begin{bmatrix} 4\\ 1\\ \end{bmatrix} $$ Next, we can pre-multiply both sides by the inverse of the matrix $\begin{bmatrix} 1 & -2 \\ 2 & 3 \\ \end{bmatrix}$ leaving $\begin{bmatrix} x\\ y\\ \end{bmatrix}$ on its own on the LHS. This is utilizing the rule that any matrix $A$ when multiplied by its inverse $A^{-1}$ results in a matrix known as the identity matrix, which in the case of 2x2 matrices is $\begin{bmatrix} 1 & 0 \\ 0 & 1 \\ \end{bmatrix}$ . The identity matrix has similar properties to that of the number $1$, where if you multiply something by it, the result is the same as the value you are multiplying.
We are now left with the follow result: $$ \begin{bmatrix} x\\ y\\ \end{bmatrix} = \begin{bmatrix} 1 & -2 \\ 2 & 3 \\ \end{bmatrix}^{-1} \begin{bmatrix} 4\\ 1\\ \end{bmatrix} $$ This can then be evaluated to give the answer: $$ \begin{bmatrix} x\\ y\\ \end{bmatrix} = \begin{bmatrix} 2\\ -1\\ \end{bmatrix} $$
How to find the inverse of a 2x2 matrix