# The geometry of linear equation

Use matrix form to study linear equations and relative pircture of the matrix

For example: 

\begin{align}
2x &-y &=0 \\ 
-x &+2y &=3
\end{align}

It can be rapresented as a matrix  2 rows X 2 colums:

$$
\begin{bmatrix}
2 & -1 \\
-1 & 2
\end{bmatrix} \circ
\begin{bmatrix}
x \\
y
\end{bmatrix} = 
\begin{bmatrix}
0 \\
3
\end{bmatrix}
$$

I can not resist writing the matrix form that can be called at this point a **Linear Equation**

$$ A \cdot X = b $$

Let's write the **Row Picture** of the two equation and the solution in the poiunt *P(1,2)* as the intersection of the the lines.


```python
import numpy as np
import matplotlib.pyplot as plt
plt.xlim(-5, 5)
plt.ylim(-5, 5)
x = np.linspace(-5,5, 10)
plt.quiver([0, -5], [-5, 0], [0, 10], [10, 0], angles='xy', scale_units='xy', scale=1)
plt.plot(x, 2 * x, 'r-', label="2x - y = 0")
plt.plot(x, 0.5 * x + 1.5, 'b-', label = "-x + 2y = 3")
plt.scatter(1,2, c='blue', marker='o')
plt.annotate('P (1,2)', xy=(1, 2), xytext=(1, 1.5))
plt.legend()
plt.show()
```

Now let's weite the column picture:

$$
X 
\begin{bmatrix}
2  \\
-1 
\end{bmatrix} +
Y
\begin{bmatrix}
-1 \\
2
\end{bmatrix} = 
\begin{bmatrix}
0 \\
3
\end{bmatrix}
$$

And this form is called **Lienar combination of columns** Let's write the **Column Picture**


```python
plt.close()
plt.xlim(-3, 3)
plt.ylim(-3, 3)
plt.quiver([0, -3], [-3, 0], [0, 6], [6, 0], angles='xy', scale_units='xy', scale=1)
plt.quiver([0, 0], [0, 0], [2, -1], [-1, 2], color='b',angles='xy', scale_units='xy', scale=1)
plt.show()
```


```python

```

ba1a4c55d88ec68305f535b1c1c277868a19a3a5
ipynb
Jupyter Notebook
linear-algebra.ipynb
daval302/computer-science
1e6a8a94e10a98109e2dadceedf666b3b9cb2474
MIT
2020-04-02T12:16:46.000Z
2020-04-02T12:16:46.000Z
linear-algebra.ipynb
daval302/computer-science
1e6a8a94e10a98109e2dadceedf666b3b9cb2474
MIT
linear-algebra.ipynb
daval302/computer-science
1e6a8a94e10a98109e2dadceedf666b3b9cb2474
MIT
Qwen/Qwen-72B
1. YES
2. YES