11.1. Python Numpy and Vector Homework

  1. Consider two vectors.

    \[\begin{split}\bm{a} = \begin{bmatrix} 3 \\ 8 \end{bmatrix} \hspace{1in} \bm{b} = \begin{bmatrix} -2 \\ 5 \end{bmatrix}\end{split}\]
    1. Compute the dot product \(\bm{a} \cdot \bm{b}\).

    2. What is the length of vectors \(\bm{a}\) and \(\bm{b}\).

    3. What is the angle between \(\bm{a}\) and \(\bm{b}\) in degrees?

  2. What Python command creates a numpy array of a \(3{\times}3\) identity matrix?

  3. If x holds a numpy one dimensional array of length 5, what Python command will convert it to a column vector?