# Linear algebra

## Linear Function

For any 2 point A(0,0) , B(${\displaystyle x_{o},y_{o}}$ ) a straight line can be drawn . The slope of the line is

${\displaystyle m={\frac {y_{o}}{x_{o}}}}$

Therefore,

${\displaystyle y_{o}=mx_{o}}$

For a point C(${\displaystyle x,y}$ ) on the same line of the slope m

${\displaystyle m={\frac {y-y_{o}}{x-x_{o}}}}$
${\displaystyle y=y_{o}+m(x-x_{o})}$

## Linear Equations

Has general form

 ${\displaystyle Ax=0}$ ${\displaystyle x=0}$ ${\displaystyle Ax=C}$ ${\displaystyle x={\frac {C}{A}}}$ ${\displaystyle Ax+B=C}$ ${\displaystyle x={\frac {C-B}{A}}}$ ${\displaystyle Ax+By=C}$ ${\displaystyle x={\frac {C}{A}}}$  with ${\displaystyle y=0}$ ${\displaystyle y={\frac {C}{B}}}$  with ${\displaystyle x=0}$

## System of Linear Equations

### Example

${\displaystyle 2x+y=11\,}$
${\displaystyle -4x+3y=13\,}$

### Roots of system of equations

#### Variable Elimination

${\displaystyle 2x+y=11\,}$
${\displaystyle -4x+3y=13\,}$

Multiply 1st row by 2 add to 2nd row

${\displaystyle 4x+2y=22\,}$
${\displaystyle -4x+3y=13\,}$

Yields

${\displaystyle 5y=35\,}$  => ${\displaystyle y=7}$

Multiply 1st row by -3 add to 2nd row

${\displaystyle -6x-3y=-33\,}$
${\displaystyle -4x+3y=13\,}$

Yields

${\displaystyle -10x=-20\,}$  => ${\displaystyle x=2}$

#### Substitution

If you get a system of equations that looks like this:

${\displaystyle 2x+y=11\,}$
${\displaystyle -4x+3y=13\,}$

You can switch around some terms in the first to get this:

${\displaystyle y=-2x+11\,}$

Then you can substitute that into the bottom one so that it looks like this:

${\displaystyle -4x+3(-2x+11)=13\,}$
${\displaystyle -4x-6x+33=13\,}$
${\displaystyle -10x+33=13\,}$
${\displaystyle -10x=-20\,}$
${\displaystyle x=2\,}$

Then, you can substitute 2 into an x from either equation and solve for y. It's usually easier to substitute it in the one that had the single y. In this case, after substituting 2 for x, you would find that y = 7.

#### Determinant

If you get a system of equations that looks like this:

${\displaystyle 2x+y=11\,}$
${\displaystyle -4x+3y=13\,}$

Solve for y

${\displaystyle x+{\frac {1}{2}}y={\frac {11}{2}}\,}$
${\displaystyle x+{\frac {3}{-4}}y={\frac {13}{-4}}\,}$
${\displaystyle y({\frac {1}{2}}-{\frac {3}{-4}})={\frac {11}{2}}-{\frac {13}{-4}}}$
${\displaystyle y={\frac {{\frac {11}{2}}-{\frac {13}{-4}}}{{\frac {1}{2}}-{\frac {3}{-4}}}}}$

Solve for x

${\displaystyle 2x+y=11\,}$
${\displaystyle {\frac {-4}{3}}x+y={\frac {13}{3}}\,}$
${\displaystyle x(2-{\frac {-4}{3}})=11-{\frac {13}{3}}}$
${\displaystyle x={\frac {11-{\frac {13}{3}}}{2-{\frac {-4}{3}}}}}$

#### Find Roots of System of Linear Equations systematically

${\displaystyle A_{1}x+B_{1}y=C_{1}}$
${\displaystyle A_{2}x+B_{2}y=C_{2}}$

Eliminate variable x

${\displaystyle x+{\frac {B_{1}}{A_{1}}}y={\frac {C_{1}}{A_{1}}}}$
${\displaystyle x+{\frac {B_{2}}{A_{2}}}y={\frac {C_{2}}{A_{2}}}}$

${\displaystyle y({\frac {B_{1}}{A_{1}}}-{\frac {B_{2}}{A_{2}}})={\frac {C_{1}}{A_{1}}}-{\frac {C_{2}}{A_{2}}}}$

Solve for y

${\displaystyle y={\frac {{\frac {C_{1}}{A_{1}}}-{\frac {C_{2}}{A_{2}}}}{{\frac {B_{1}}{A_{1}}}-{\frac {B_{2}}{A_{2}}}}}}$

Eliminate variable y

${\displaystyle {\frac {A_{1}}{B_{1}}}x+y={\frac {C_{1}}{B_{1}}}}$
${\displaystyle {\frac {A_{2}}{B_{2}}}x+y={\frac {C_{2}}{B_{2}}}}$

${\displaystyle x({\frac {A_{1}}{B_{1}}}-{\frac {A_{2}}{B_{2}}})={\frac {C_{1}}{B_{1}}}-{\frac {C_{2}}{B_{2}}}}$
${\displaystyle x={\frac {{\frac {C_{1}}{B_{1}}}-{\frac {C_{2}}{B_{2}}}}{{\frac {A_{1}}{B_{1}}}-{\frac {A_{2}}{B_{2}}}}}}$