# Homework #1 Solutions

Calculate problems #1 and #2 manually and use http://www.continuummechanics.org/interactivecalcs.html to double-check.

1. Calculate the length of each vector and find the angle between them: $${\bf a} = (12, 3, 4)$$ and $${\bf b} = (16, 48, 12)$$.

$\begin{eqnarray} |{\bf a}| & = & \sqrt { 12^2 + 3^2 + 4^2 } = 13 \\ \\ |{\bf b}| & = & \sqrt { 16^2 + 48^2 + 12^2 } = 52 \\ \\ |{\bf a}| |{\bf b}| \cos(\theta) & = & {\bf a} \cdot {\bf b} = 12 * 16 + 3 * 48 + 4 * 12 = 384 \\ \\ \text{so } \cos(\theta) & = & 384 / (13 * 52) = 0.5680 \\ \\ \text{ and } \theta & = & \cos^{-1}(0.5680) = 55.4^\circ \end{eqnarray}$

2. Find the area of a triangle whose edges are the two vectors in #1 above. Ignore units.

$\begin{eqnarray} {\bf a} \times {\bf b} & = & (12, 3, 4) \times (16, 48, 12) \\ \\ & = & (3 * 12 - 4 * 48) {\bf i} + (4 * 16 - 12 * 12) {\bf j} + (12 * 48 - 3 * 16) {\bf k} \\ \\ & = & -156 {\bf i} - 80 {\bf j} + 528 {\bf k} \end{eqnarray}$

The length of the vector is 556.35

So the area of the triangle is $\begin{eqnarray} Area & = & {1 \over 2} | {\bf a} \times {\bf b} | \\ \\ & = & {1 \over 2} ( 556.35) \\ \\ & = & 278.17 \end{eqnarray}$

3. Don't do the remaining ones manually. It's too tedious. Just use the above webpage directly and write out the results.

4. Given $$\quad {\bf A} = \left[ \matrix { 2 & 5 & 1 \\ 4 & 8 & 2 \\ 6 & 2 & 4 } \right] \quad$$ and $$\quad {\bf B} = \left[ \matrix { 3 & 4 & 2 \\ 1 & 7 & 5 \\ 3 & 2 & 4 } \right] \quad$$ Demonstrate that $${\bf A} \cdot {\bf B} \ne {\bf B} \cdot {\bf A}$$, but $$( {\bf A} \cdot {\bf B} )^T = {\bf B}^T \cdot {\bf A}^T$$.

${\bf A} \cdot {\bf B} = \left[ \matrix{ 14 & 45 & 33 \\ 26 & 76 & 56 \\ 32 & 46 & 38 } \right]$ and ${\bf B} \cdot {\bf A} = \left[ \matrix{ 34 & 51 & 19 \\ 60 & 71 & 35 \\ 38 & 39 & 23 } \right] \quad \ne \quad {\bf A} \cdot {\bf B}$

$({\bf A} \cdot {\bf B})^T = \left[ \matrix{ 14 & 26 & 32 \\ 45 & 76 & 46 \\ 33 & 56 & 38 } \right]$ and ${\bf B}^T \cdot {\bf A}^T = \left[ \matrix{ 14 & 26 & 32 \\ 45 & 76 & 46 \\ 33 & 56 & 38 } \right]$

5. Calculate the double dot product of the two matrices, $${\bf A} : {\bf B}$$.

${\bf A} : {\bf B} = 136$

6. Calculate the inverse of $${\bf A}$$ in #3 and confirm that $${\bf A} \cdot {\bf A}^{-1} \; = \; {\bf A}^{-1} \cdot {\bf A} \; = \; {\bf I}$$.

${\bf A} = \left[ \matrix { 2 & 5 & 1 \\ 4 & 8 & 2 \\ 6 & 2 & 4 } \right] \qquad \qquad {\bf A}^{-1} = \left[ \matrix { -7 & 4.5 & -0.5 \\ 1 & -0.5 & 0 \\ 10 & -6.5 & 1 } \right]$

${\bf A} \cdot {\bf A}^{-1} \; = \; \left[ \matrix { 2 & 5 & 1 \\ 4 & 8 & 2 \\ 6 & 2 & 4 } \right] \left[ \matrix { -7 & 4.5 & -0.5 \\ 1 & -0.5 & 0 \\ 10 & -6.5 & 1 } \right] \; = \; \left[ \matrix { 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 } \right]$

${\bf A}^{-1} \cdot {\bf A} \; = \; \left[ \matrix { -7 & 4.5 & -0.5 \\ 1 & -0.5 & 0 \\ 10 & -6.5 & 1 } \right] \left[ \matrix { 2 & 5 & 1 \\ 4 & 8 & 2 \\ 6 & 2 & 4 } \right] \; = \; \left[ \matrix { 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 } \right]$