# HW 2 Solutions

Problem 1.  We have that

$\displaystyle |\vec{v}| = \sqrt{1^2 + 2^2 + 3^2 + 4^2 + 5^2} = \sqrt{55}$.

To compute the magnitude of $\vec{v}-2\vec{w}$, we first need to write out this vector.  We have

$\vec{v} - 2\vec{w} = \langle 0, -4, 3, 0, 7 \rangle$

and so

$\displaystyle \left|\vec{v}-2\vec{w}\right| = \sqrt{0^2+(-4)^2+3^2+0^2+7^2} = \sqrt{74}$.

Problem 2.  (a) skipped

(b) In order for $\vec{w} = \langle 1, c \rangle$ to be perpendicular (aka orthogonal) to the vector $\vec{v} = \langle 1, 2 \rangle$ we need the following equation to be true:

$\displaystyle 0 = \vec{v}\cdot\vec{w} = 1 + 2c$

and so $c = -1/2$.

Problem 3.  (a) For the first level set, notice that the given equation can be rewritten:

$\displaystyle 8 = x^2 - 2x +y^2 = x^2 - 2x + 1 +y^2 - 1 = \left(x-1\right)^2 + y^2 - 1$.

Moving the negative one to the other side, we find that this equation is equivalent to the easier-to-look-at equation

$\displaystyle 9 = \left(x-1\right)^2 + y^2$.

This is the equation for a circle centered at $(1, 0)$ and with radius $R = 3$.

(b) Similarly, the equation that defines the level set $S$ can be rewritten in a more helpful way.

$\displaystyle -4 = x^2-4x + y^2-2y + z^2 = x^2-4x + 4 - 4 + y^2 - 2y +1-1 + z^2 = (x-2)^2 + (y-1)^2 + z^2 - 5.$

Again, after moving around some constants, this equation becomes

$\displaystyle 1 = (x-2)^2 + (y-1)^2 + z^2$

which is the equation for a sphere of radius $R = \sqrt{1} = 1$ centered at the point $(2, 1, 0)$.

Problem 4.  We have

$\vec{v}\cdot\vec{w} = v_1w_1 + v_2w_2 + \cdots + v_nw_n$.

Problem 5.  (a) $\langle 2, -1 \rangle$ is not perpendicular to $\vec{v}$ since their dot product does not equal zero.

(b) There is an entire line’s worth of vectors that are perpendicular to $\vec{v} = \langle -2, 5 \rangle$.  Indeed, any such vector, $\vec{w} = \langle x, y \rangle$ must satisfy the equation

$-2x + 5y = 0$.

All of the points that make this equation true lie on a line.  However, only some of these points correspond to unit vectors.  To find the exact ones, we need to find any (non-zero) vector that lies on this line.  For example, we can use $\vec{w} = \langle 5, 2 \rangle$.  To make this a unit vector we can set

$\displaystyle \vec{u} = \frac{\vec{w}}{|\vec{w}|} = \frac{1}{\sqrt{29}}\langle 5, 2\rangle$.

There is only one other unit vector that is also perpendicular to $\vec{v}$, and that is the vector $-\vec{u}$.

(c ) These two vectors are not perpendicular since their dot product does not equal zero.

(d) In this case there are an entire plane’s worth of vectors perpendicular to the given vector $\vec{y}$.  They are determined by solving the equation

$2x - y - 2z = 0$

and one such vector that is perpendicular to $\vec{y}$ is $\langle 1, 0, 1 \rangle$.  To make this a unit vector we can simply set

$\displaystyle \vec{u} = \frac{1}{\sqrt{2}}\langle 1, 0, 1 \rangle$.

In this instance, there are infinitely many more unit vectors that are perpendicular to $\vec{y} = \langle 2, -1, 2 \rangle$.  Indeed, there is a circle’s worth of vectors, obtained by rotating our single unit vector $\vec{u}$ by any angle about the line formed by vector $\vec{y}$.

(e) If we knew how to use the cross product for this problem, we could have used

$\vec{r} = \vec{z} \times \vec{y}$.

Another way to solve this problem is to write $\vec{r} = \langle x, y, z \rangle$ and note that if $\vec{r}$ is supposed to be perpendicular to both $\vec{y}$ and to $\vec{z}$ then two equations would need to be satisfied:

$0 = \vec{r}\cdot\vec{y} = 2x - y - 2z$

$0 = \vec{r}\cdot\vec{z} = 2x + y$.

There are infinitely many vectors $\vec{r}$ that solve these equations, but they are all scalar multiples of one another (they all lie along a single line).  If we also want $\vec{r}$ to be unit, then there will only be two vectors on this line that work.

Problem 6.  All of the parts of this exercise can be done using the basic properties of the dot product.  For example, part (c) can be answered by noting

$\displaystyle \left(2\vec{u}+4\vec{v}\right)\cdot\left(\vec{u}-7\vec{v}\right) = (2\vec{u} + 4\vec{v})\cdot\vec{u} - 7(2\vec{u} + 4\vec{v})\vec{v}$

These remaining dot products can be distributed further:

$\displaystyle = 2\vec{u}\cdot\vec{u} + 4\vec{v}\cdot\vec{u} - 14\vec{u}\cdot\vec{v} - 28\vec{v}\cdot\vec{v} = 2(4) + 4(-1) - 14(-1) - 28(9)$.