# Part 1 - Scalars and Vectors

For the questions below it is not sufficient to simply provide answer to the questions, but you must solve the problems and show your work using python (the NumPy library will help a lot!) Translate the vectors and matrices into their appropriate python  representations and use numpy or functions that you write yourself to demonstrate the result or property. 


```
import numpy as np
import pandas as pd
import math
import matplotlib.pyplot as plt
```

## 1.1 Create a two-dimensional vector and plot it on a graph


```
# vector samples
green = [-.6, .7]
purple = [.3, .2]
orange = [.4, -.4]
```


```
# examine component
orange[0]
```




    0.4




```
# loop
for color in [green, purple, orange]:
  print(color[1])
```

    0.7
    0.2
    0.4



```
# plotting using matplotlib
fig, ax = plt.subplots()
ax.grid()
plt.xlim(-.8, .8)
plt.ylim(-.8, .8)
plt.arrow(0,0,
          green[0],
          green[1],
          head_width=.02,
          head_length=.02,
          linewidth=3,
          color='green')
plt.arrow(0,0,
          purple[0],
          purple[1],
          head_width=.02,
          head_length=.02,
          linewidth=3,
          color='purple')
plt.arrow(0,0,
          orange[0],
          orange[1],
          head_width=.02,
          head_length=.02,
          linewidth=3,
          color='orange');
```


```
print(green, purple, orange)
```

    [-0.6, 0.7] [0.3, 0.2] [0.4, -0.4]


## 1.2 Create a three-dimensional vecor and plot it on a graph


```
# create 3 dimensional vector
green = [.5, .5, .5]
purple = [.4, .3, .2]
orange = [.2, .1, .1]
myvector = np.array([[0,0,0, .5, .5, .5],
                     [0,0,0, .4, .3, .2],
                     [0,0,0, .2, .1, .1]])
myvector[0]
```




    array([0. , 0. , 0. , 0.5, 0.5, 0.5])




```
# unzip vector
X, Y, Z, U, V, W = zip(*myvector)
for letter in [X, Y, Z, U, V, W]:
  print(letter)
```

    (0.0, 0.0, 0.0)
    (0.0, 0.0, 0.0)
    (0.0, 0.0, 0.0)
    (0.5, 0.4, 0.2)
    (0.5, 0.3, 0.1)
    (0.5, 0.2, 0.1)



```
# displaying in 3d
from mpl_toolkits.mplot3d import Axes3D

fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.quiver(X[0], Y[0], Z[0], U[0], V[0], W[0], length=1, color='green')
ax.quiver(X[1], Y[1], Z[1], U[1], V[1], W[1], length=1, color='purple')
ax.quiver(X[2], Y[2], Z[2], U[2], V[2], W[2], length=1, color='orange')

ax.set_xlim([0, 1])
ax.set_ylim([0, 1])
ax.set_zlim([0, 1])
ax.set_xlabel('X')
ax.set_ylabel('Y')
ax.set_zlabel('Z')
plt.show()
```

## 1.3 Scale the vectors you created in 1.1 by $5$, $\pi$, and $-e$ and plot all four vectors (original + 3 scaled vectors) on a graph. What do you notice about these vectors? 


```
from math import e, pi
print(e)
print(pi)
```

    2.718281828459045
    3.141592653589793



```
# scale by 5
pink = np.multiply(5, green)
yellow = np.multiply(5, purple)
red = np.multiply (5, orange)
pink, yellow, red
```




    (array([-3. ,  3.5]), array([1.5, 1. ]), array([ 2., -2.]))




```
# scale by pi
blue = np.multiply(pi, green)
cyan = np.multiply(pi, purple)
brown = np.multiply(pi, orange)
blue, cyan, brown
```




    (array([-1.88495559,  2.19911486]),
     array([0.9424778 , 0.62831853]),
     array([ 1.25663706, -1.25663706]))




```
# scale by e
magenta = np.multiply(e, green)
teal = np.multiply(e, purple)
sienna = np.multiply(e, orange)
magenta, teal, sienna
```




    (array([-1.6309691 ,  1.90279728]),
     array([0.81548455, 0.54365637]),
     array([ 1.08731273, -1.08731273]))




```
# plot on graph
ax.grid()
plt.xlim(-3, 3)
plt.ylim(-3, 3)
plt.arrow(0,0,
          green[0],
          green[1],
          head_width=.02,
          head_length=.02,
          linewidth=3,
          color='green')
plt.arrow(0,0,
          purple[0],
          purple[1],
          head_width=.02,
          head_length=.02,
          linewidth=3,
          color='purple')
plt.arrow(0,0,
          orange[0],
          orange[1],
          head_width=.02,
          head_length=.02,
          linewidth=3,
          color='orange')
plt.arrow(0,0,
          pink[0],
          pink[1],
          head_width=.02,
          head_length=.02,
          linewidth=3,
          color='pink')
plt.arrow(0,0,
          yellow[0],
          yellow[1],
          head_width=.02,
          head_length=.02,
          linewidth=3,
          color='yellow')
plt.arrow(0,0,
          red[0],
          red[1],
          head_width=.02,
          head_length=.02,
          linewidth=3,
          color='red')
plt.arrow(0,0,
          blue[0],
          blue[1],
          head_width=.02,
          head_length=.02,
          linewidth=3,
          color='blue')
plt.arrow(0,0,
          cyan[0],
          cyan[1],
          head_width=.02,
          head_length=.02,
          linewidth=3,
          color='cyan')
plt.arrow(0,0,
          brown[0],
          brown[1],
          head_width=.02,
          head_length=.02,
          linewidth=3,
          color='brown')
plt.arrow(0,0,
          magenta[0],
          magenta[1],
          head_width=.02,
          head_length=.02,
          linewidth=3,
          color='magenta')
plt.arrow(0,0,
          teal[0],
          teal[1],
          head_width=.02,
          head_length=.02,
          linewidth=3,
          color='teal')
plt.arrow(0,0,
          sienna[0],
          sienna[1],
          head_width=.02,
          head_length=.02,
          linewidth=3,
          color='sienna');
```


```
# the vectors follow the same direction of their multlipicand
```


```

```

## 1.4 Graph vectors $\vec{a}$ and $\vec{b}$ and plot them on a graph

\begin{align}
\vec{a} = \begin{bmatrix} 5 \\ 7 \end{bmatrix}
\qquad
\vec{b} = \begin{bmatrix} 3 \\4 \end{bmatrix}
\end{align}


```
a = [5, 7]
b = [3, 4]
```


```
np_a = np.array(a)
np_b = np.array(b)
print(np_a, np_b)
```

    [5 7] [3 4]



```
# graph
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
ax.grid()
plt.xlim(-0,8)
plt.ylim(0,8)

plt.arrow(0,0,
          a[0],
          a[1],
          head_width=.02,
          head_length=.02,
          linewidth=3,
          color='gold')
plt.arrow(0,0,
          b[0],
          b[1],
          head_width=.02,
          head_length=.02,
          linewidth=3,
          color='grey');
```

## 1.5 find $\vec{a} - \vec{b}$ and plot the result on the same graph as $\vec{a}$ and $\vec{b}$. Is there a relationship between vectors $\vec{a} \thinspace, \vec{b} \thinspace \text{and} \thinspace \vec{a-b}$


```
c = np_a - np_b
c
```




    array([2, 3])




```
# graph
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
ax.grid()
plt.xlim(-0,8)
plt.ylim(0,8)

plt.arrow(0,0,
          a[0],
          a[1],
          head_width=.02,
          head_length=.02,
          linewidth=3,
          color='gold')
plt.arrow(0,0,
          b[0],
          b[1],
          head_width=.02,
          head_length=.02,
          linewidth=3,
          color='grey')
plt.arrow(0,0,
          c[0],
          c[1],
          head_width=.02,
          head_length=.02,
          linewidth=3,
          color='tan');
```

## 1.6 Find $c \cdot d$

\begin{align}
\vec{c} = \begin{bmatrix}7 & 22 & 4 & 16\end{bmatrix}
\qquad
\vec{d} = \begin{bmatrix}12 & 6 & 2 & 9\end{bmatrix}
\end{align}



```
# define c and d
c = np.array([7, 22, 4, 16])
d = np.array([12, 6, 2 , 9])
c, d
```




    (array([ 7, 22,  4, 16]), array([12,  6,  2,  9]))




```
# dot-product method
np.dot(c,d)
```




    368



##  1.7 Find $e \times f$

\begin{align}
\vec{e} = \begin{bmatrix} 5 \\ 7 \\ 2 \end{bmatrix}
\qquad
\vec{f} = \begin{bmatrix} 3 \\4 \\ 6 \end{bmatrix}
\end{align}


```
e = np.array([5, 7, 2])
f = np.array([3, 4, 6])
e, f
```




    (array([5, 7, 2]), array([3, 4, 6]))




```
e * f
```




    array([15, 28, 12])



## 1.8 Find $||g||$ and then find $||h||$. Which is longer?

\begin{align}
\vec{g} = \begin{bmatrix} 1 \\ 1 \\ 1 \\ 8 \end{bmatrix}
\qquad
\vec{h} = \begin{bmatrix} 3 \\3 \\ 3 \\ 3 \end{bmatrix}
\end{align}


```
g = ([1, 1, 8, 8])
h = ([3, 3, 3, 3])
g, h
```




    ([1, 1, 8, 8], [3, 3, 3, 3])




```
# norm_g is longer
norm_g = np.linalg.norm(g)
norm_h = np.linalg.norm(h)
norm_g, norm_h
```




    (11.40175425099138, 6.0)



# Part 2 - Matrices

## 2.1 What are the dimensions of the following matrices? Which of the following can be multiplied together? See if you can find all of the different legal combinations.
\begin{align}
A = \begin{bmatrix}
1 & 2 \\
3 & 4 \\
5 & 6
\end{bmatrix}
\qquad
B = \begin{bmatrix}
2 & 4 & 6 \\
\end{bmatrix}
\qquad
C = \begin{bmatrix}
9 & 6 & 3 \\
4 & 7 & 11
\end{bmatrix}
\qquad
D = \begin{bmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1
\end{bmatrix}
\qquad
E = \begin{bmatrix}
1 & 3 \\
5 & 7
\end{bmatrix}
\end{align}


```
# A is 3 x 2
# B is 1 x 3
# C is 2 x 3
# D is 3 x 3
# E is 2 x 2
```


```
# compatible matrices
# A & B
# A & C
# A & D
# E & A
# D & B
# D & C
# C & E
```

## 2.2 Find the following products: CD, AE, and BA. What are the dimensions of the resulting matrices? How does that relate to the dimensions of their factor matrices?


```
# Define Matrices
A = np.array([[1, 2],
     [3, 4],
     [5, 6]])
B = np.array([[2, 4, 6]])
C = np.array([[9, 6, 3],
              [4, 7, 11]])
D = np.array([[1, 0, 0],
              [0, 1, 0],
              [0, 0, 1]])
E = np.array([[1, 3],
              [5, 7]])
A, B, C, D, E
```




    (array([[1, 2],
            [3, 4],
            [5, 6]]), array([[2, 4, 6]]), array([[ 9,  6,  3],
            [ 4,  7, 11]]), array([[1, 0, 0],
            [0, 1, 0],
            [0, 0, 1]]), array([[1, 3],
            [5, 7]]))




```
# CD - 2x3
pd.DataFrame(np.matmul(C, D))
```




<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>0</th>
      <th>1</th>
      <th>2</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>9</td>
      <td>6</td>
      <td>3</td>
    </tr>
    <tr>
      <th>1</th>
      <td>4</td>
      <td>7</td>
      <td>11</td>
    </tr>
  </tbody>
</table>
</div>




```
# AE - 3x2
pd.DataFrame(np.matmul(A, E))
```




<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>0</th>
      <th>1</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>11</td>
      <td>17</td>
    </tr>
    <tr>
      <th>1</th>
      <td>23</td>
      <td>37</td>
    </tr>
    <tr>
      <th>2</th>
      <td>35</td>
      <td>57</td>
    </tr>
  </tbody>
</table>
</div>




```
# BA - 1x2
pd.DataFrame(np.matmul(B, A))
```




<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>0</th>
      <th>1</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>44</td>
      <td>56</td>
    </tr>
  </tbody>
</table>
</div>




```
# the resulting matrices usually takes on the shape of the smaller factor
```

## 2.3  Find $F^{T}$. How are the numbers along the main diagonal (top left to bottom right) of the original matrix and its transpose related? What are the dimensions of $F$? What are the dimensions of $F^{T}$?

\begin{align}
F = 
\begin{bmatrix}
20 & 19 & 18 & 17 \\
16 & 15 & 14 & 13 \\
12 & 11 & 10 & 9 \\
8 & 7 & 6 & 5 \\
4 & 3 & 2 & 1
\end{bmatrix}
\end{align}


```
F = np.array([[20, 19, 19, 17],
              [16, 15, 14, 13],
              [12, 11, 10, 9],
              [8, 7, 6, 5],
              [4, 3, 2, 1]])
F
```




    array([[20, 19, 19, 17],
           [16, 15, 14, 13],
           [12, 11, 10,  9],
           [ 8,  7,  6,  5],
           [ 4,  3,  2,  1]])




```
pd.DataFrame(F.T)
# the dimension changed from 5x4 to 4x5, thus, the first 4 diagonal 
# numbers remained
```




<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>0</th>
      <th>1</th>
      <th>2</th>
      <th>3</th>
      <th>4</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>20</td>
      <td>16</td>
      <td>12</td>
      <td>8</td>
      <td>4</td>
    </tr>
    <tr>
      <th>1</th>
      <td>19</td>
      <td>15</td>
      <td>11</td>
      <td>7</td>
      <td>3</td>
    </tr>
    <tr>
      <th>2</th>
      <td>19</td>
      <td>14</td>
      <td>10</td>
      <td>6</td>
      <td>2</td>
    </tr>
    <tr>
      <th>3</th>
      <td>17</td>
      <td>13</td>
      <td>9</td>
      <td>5</td>
      <td>1</td>
    </tr>
  </tbody>
</table>
</div>



# Part 3 - Square Matrices

## 3.1 Find $IG$ (be sure to show your work) 😃

You don't have to do anything crazy complicated here to show your work, just create the G matrix as specified below, and a corresponding 2x2 Identity matrix and then multiply them together to show the result. You don't need to write LaTeX or anything like that (unless you want to).

\begin{align}
G= 
\begin{bmatrix}
13 & 14 \\
21 & 12 
\end{bmatrix}
\end{align}


```
# G Matrix
G = np.array([[13, 14],
              [21, 12]])
pd.DataFrame(G)
```




<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>0</th>
      <th>1</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>13</td>
      <td>14</td>
    </tr>
    <tr>
      <th>1</th>
      <td>21</td>
      <td>12</td>
    </tr>
  </tbody>
</table>
</div>




```
# Identity matrix
I = np.array ([[1, 0],
               [0, 1]])
pd.DataFrame(I)
```




<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>0</th>
      <th>1</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>1</td>
      <td>0</td>
    </tr>
    <tr>
      <th>1</th>
      <td>0</td>
      <td>1</td>
    </tr>
  </tbody>
</table>
</div>




```
# multipy
pd.DataFrame(np.matmul(I, G))
```




<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>0</th>
      <th>1</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>13</td>
      <td>14</td>
    </tr>
    <tr>
      <th>1</th>
      <td>21</td>
      <td>12</td>
    </tr>
  </tbody>
</table>
</div>



## 3.2 Find $|H|$ and then find $|J|$.

\begin{align}
H= 
\begin{bmatrix}
12 & 11 \\
7 & 10 
\end{bmatrix}
\qquad
J= 
\begin{bmatrix}
0 & 1 & 2 \\
7 & 10 & 4 \\
3 & 2 & 0
\end{bmatrix}
\end{align}



```
# H & J
H = np.array([[12, 11],
              [7,10]])
J = np.array([[0, 1, 2],
      [7, 10, 4],
      [3, 2, 0]])
```


```
pd.DataFrame(H)
```




<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>0</th>
      <th>1</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>12</td>
      <td>11</td>
    </tr>
    <tr>
      <th>1</th>
      <td>7</td>
      <td>10</td>
    </tr>
  </tbody>
</table>
</div>




```
pd.DataFrame(J)
```




<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>0</th>
      <th>1</th>
      <th>2</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>0</td>
      <td>1</td>
      <td>2</td>
    </tr>
    <tr>
      <th>1</th>
      <td>7</td>
      <td>10</td>
      <td>4</td>
    </tr>
    <tr>
      <th>2</th>
      <td>3</td>
      <td>2</td>
      <td>0</td>
    </tr>
  </tbody>
</table>
</div>



## 3.3 Find $H^{-1}$ and then find $J^{-1}$


```
# H inverse
pd.DataFrame(np.linalg.inv(H))
```




<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>0</th>
      <th>1</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>0.232558</td>
      <td>-0.255814</td>
    </tr>
    <tr>
      <th>1</th>
      <td>-0.162791</td>
      <td>0.279070</td>
    </tr>
  </tbody>
</table>
</div>




```
# J inverse
pd.DataFrame(np.linalg.inv(J))
```




<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>0</th>
      <th>1</th>
      <th>2</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>0.4</td>
      <td>-0.20</td>
      <td>0.80</td>
    </tr>
    <tr>
      <th>1</th>
      <td>-0.6</td>
      <td>0.30</td>
      <td>-0.70</td>
    </tr>
    <tr>
      <th>2</th>
      <td>0.8</td>
      <td>-0.15</td>
      <td>0.35</td>
    </tr>
  </tbody>
</table>
</div>



## 3.4 Find $HH^{-1}$ and then find $J^{-1}J$. Is $HH^{-1} == J^{-1}J$? Why or Why not? 

Please ignore Python rounding errors. If necessary, format your output so that it rounds to 5 significant digits (the fifth decimal place).


```
HH1 = np.matmul(H, np.linalg.inv(H))
pd.DataFrame(HH1)
```




<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>0</th>
      <th>1</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>1.000000e+00</td>
      <td>5.551115e-16</td>
    </tr>
    <tr>
      <th>1</th>
      <td>2.220446e-16</td>
      <td>1.000000e+00</td>
    </tr>
  </tbody>
</table>
</div>




```
JJ1 = np.matmul(J, np.linalg.inv(J))
pd.DataFrame(JJ1)
```




<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>0</th>
      <th>1</th>
      <th>2</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>1.0</td>
      <td>-5.551115e-17</td>
      <td>0.0</td>
    </tr>
    <tr>
      <th>1</th>
      <td>0.0</td>
      <td>1.000000e+00</td>
      <td>0.0</td>
    </tr>
    <tr>
      <th>2</th>
      <td>0.0</td>
      <td>0.000000e+00</td>
      <td>1.0</td>
    </tr>
  </tbody>
</table>
</div>




```
np.round(HH1, decimals=5)
```




    array([[1., 0.],
           [0., 1.]])




```
np.round(JJ1, decimals=5)
```




    array([[ 1., -0.,  0.],
           [ 0.,  1.,  0.],
           [ 0.,  0.,  1.]])



# Stretch Goals: 

A reminder that these challenges are optional. If you finish your work quickly we welcome you to work on them. If there are other activities that you feel like will help your understanding of the above topics more, feel free to work on that. Topics from the Stretch Goals sections will never end up on Sprint Challenges. You don't have to do these in order, you don't have to do all of them. 

- Write a function that can calculate the dot product of any two vectors of equal length that are passed to it.
- Write a function that can calculate the norm of any vector
- Prove to yourself again that the vectors in 1.9 are orthogonal by graphing them. 
- Research how to plot a 3d graph with animations so that you can make the graph rotate (this will be easier in a local notebook than in google colab)
- Create and plot a matrix on a 2d graph.
- Create and plot a matrix on a 3d graph.
- Plot two vectors that are not collinear on a 2d graph. Calculate the determinant of the 2x2 matrix that these vectors form. How does this determinant relate to the graphical interpretation of the vectors?



02f4014e20882ed998d917b6032e1a275e8ca796
ipynb
Jupyter Notebook
01_Unit_1/Sprint3-Linear-Algebra/Module1/LS_DS_131_Vectors_and_Matrices_Assignment.ipynb
mark-morelos/my_DataScience_notes
2e05a3d77949cb8ccd9aac7c04cf7758d7b73d1c
MIT
01_Unit_1/Sprint3-Linear-Algebra/Module1/LS_DS_131_Vectors_and_Matrices_Assignment.ipynb
mark-morelos/my_DataScience_notes
2e05a3d77949cb8ccd9aac7c04cf7758d7b73d1c
MIT
01_Unit_1/Sprint3-Linear-Algebra/Module1/LS_DS_131_Vectors_and_Matrices_Assignment.ipynb
mark-morelos/my_DataScience_notes
2e05a3d77949cb8ccd9aac7c04cf7758d7b73d1c
MIT
Qwen/Qwen-72B
1. YES
2. YES