## Linear independence


```python
import numpy as np
from sympy.solvers import solve
from sympy import Symbol

x = Symbol('x')
y = Symbol('y')
z = Symbol('z')
```

The set of vectors are called linearly independent because each of the vectors in the set {V0, V1, …, Vn−1} cannot be written as a combination of the others in the set.

### Linear Independent Arrays


```python
A = np.array([1,1,1])
B = np.array([0,1,1])
C = np.array([0,0,1])
Z = np.array([0,0,0])
```


```python
np.array_equal(
    Z, 
    0*A + 0*B + 0*C
)
```




    True




```python
solve(x*A + y*B + z*C)
```




    {z: 0, y: 0, x: 0}



### Linear Dependent Arrays


```python
A = np.array([1,1,1])
B = np.array([0,0,1])
C = np.array([1,1,0])
```


```python
1*A + -1*B + -1*C
```




    array([0, 0, 0])




```python
solve(x*A + y*B + z*C)
```




    {y: z, x: -z}




```python
A = np.array([1,2,3])
B = np.array([1,-4,-4])
C = np.array([3,0,2])
```


```python
2*A + 1*B + -C
```




    array([0, 0, 0])




```python
solve(x*A + y*B + z*C)
```




    {y: -z, x: -2*z}



d0516b337d6037d2fdcf41d288b3b9e5810dcd47
ipynb
Jupyter Notebook
juypter/notebooks/linear-algebra/3_linear_independence.ipynb
JamesMcGuigan/ecosystem-research
bfd98bd5b0a2165f449eb36b368b54fe972374fe
MIT
2019-01-01T02:04:27.000Z
2019-01-01T02:04:27.000Z
juypter/notebooks/linear-algebra/3_linear_independence.ipynb
JamesMcGuigan/ecosystem-research
bfd98bd5b0a2165f449eb36b368b54fe972374fe
MIT
2020-03-09T17:51:00.000Z
2020-03-09T17:51:00.000Z
juypter/notebooks/linear-algebra/3_linear_independence.ipynb
JamesMcGuigan/ecosystem-research
bfd98bd5b0a2165f449eb36b368b54fe972374fe
MIT
Qwen/Qwen-72B
1. YES
2. YES