# Fundamental Mathematics/Matrix/System of linear equations

## System of linear equations

System of linear equation of 2 variables has general form

$A_{11}x+A_{12}y=C_{1}$ $A_{21}x+A_{22}y=C_{2}$ Which can be written as matrix

$[A_{11}|A_{12}][x]=[C_{1}]$ $[A_{21}|A_{22}][y]=[C_{2}]$ ### To solve for y value

Divide 1st equation by A11 and 2nd equation by A21

$x+{\frac {A_{12}}{A_{11}}}y={\frac {C_{1}}{A_{11}}}$ $x+{\frac {A_{22}}{A_{21}}}y={\frac {C_{2}}{A_{21}}}$ Subtract 2 equation above

$y{\frac {A_{12}}{A_{11}}}-{\frac {A_{22}}{A_{21}}}={\frac {C_{1}}{A_{11}}}-{\frac {C_{2}}{A_{21}}}$ $y={\frac {{\frac {C_{1}}{A_{11}}}-{\frac {C_{2}}{A_{21}}}}{{\frac {A_{12}}{A_{11}}}-{\frac {A_{22}}{A_{21}}}}}$ $[A_{11}C_{1}]$ $[A_{12}C_{2}]$ $----$ $[A_{11}A_{12}]$ $[A_{21}A_{22}]$ ### To solve for x value

Divide 1st equation by A12 and 2nd equation by A22

${\frac {A_{11}}{A_{12}}}x+y={\frac {C_{1}}{A_{12}}}$ ${\frac {A_{21}}{A_{22}}}x+y={\frac {C_{2}}{A_{22}}}$ Subtract 2 equation above

$x{\frac {A_{11}}{A_{12}}}-{\frac {A_{21}}{A_{22}}}={\frac {C_{1}}{A_{12}}}-{\frac {C_{2}}{A_{22}}}$ $x={\frac {{\frac {C_{1}}{A_{12}}}-{\frac {C_{2}}{A_{22}}}}{{\frac {A_{11}}{A_{12}}}-{\frac {A_{21}}{A_{22}}}}}$ 