Write your solutions to the following problems either by writing them on a piece of paper or on a tablet and scanning your answers as a PDF. Note that you are not allowed to use LaTeX, Google Docs, or any other digital document creation software to type your answers. Homeworks are due to Pensive by 11:59PM on the due date. See the syllabus for details on the slip day policy.
Homework will be evaluated not only on the correctness of your answers, but on your ability to present your ideas clearly and logically. You should always explain and justify your conclusions, using sound reasoning. Your goal should be to convince the reader of your assertions. If a question does not require explanation, it will be explicitly stated.
Have the notes open while working on the homework!Chapter 2.4, Chapter 2.5, Chapter 2.6, and Chapter 2.7 (coming soon) are all very relevant. We’ve added the relevant lab and lecture worksheet content to them, so they are comprehensive.
Problem 1: Homework 3 Solutions Review (6 pts)
Review the solutions to Homework 3. Pick two problem parts (for example, Problem 3a and Problem 5b) from Homework 3 in which your solutions have the most room for improvement, i.e., where they have unsound reasoning, could be significantly more efficient or clearer, etc. Include a screenshot of your solution to each problem part, and in a few sentences, explain what was deficient and how it could be fixed.
Alternatively, if you think one of your solutions is significantly better than the posted one, copy it here and explain why you think it is better. If you didn’t do Homework 3, choose two problem parts from it that look challenging to you, and in a few sentences, explain the key ideas behind their solutions in your own words.
Solution
Responses will vary. Look for specific comparisons with the posted solutions and clear explanations of how to improve the selected work.
(2 pts) Write \(\ell_0\) in parametric form. In other words, write three separate equations: \(x=\cdots\), \(y=\cdots\), and \(z=\cdots\), each of which involves the same parameter, e.g., \(t\).
Reading off the entries gives the three equations above. They use the same \(t\) because each value of \(t\) selects one point on the line.
b)
(4 pts) Write a system of two linear equations in \(x\), \(y\), and \(z\) whose common solutions are exactly the points on \(\ell_0\). Your equations should not contain a parameter.
Then, verify that every point on \(\ell_0\) satisfies your system by plugging in your parametric formulas from part (a).
Following Chapter 2.5, let’s find two independent vectors perpendicular to the direction of the line. A vector \(\begin{bmatrix}a\\b\\c\end{bmatrix}\) is perpendicular to \(\begin{bmatrix}6\\-4\\9\end{bmatrix}\) when
$$ 6a-4b+9c=0. $$
Setting \(c=0\) gives \(6a=4b\), so one choice is \(\vec n_1=\begin{bmatrix}2\\3\\0\end{bmatrix}\). Setting \(b=0\) gives \(6a=-9c\), so another is \(\vec n_2=\begin{bmatrix}3\\0\\-2\end{bmatrix}\). These vectors are not scalar multiples of each other.
Substituting the formulas from part (a) verifies both equations:
Thus every point on \(\ell_0\) satisfies both equations.
To see that the system has no extra solutions, set \(t=x/6\). The first equation forces \(y=-2x/3=-4t\), and the second forces \(z=3x/2=9t\). We recover exactly the parametrization in part (a).
Write \(\ell\) in parametric form, then find a system of two linear equations whose common solutions are exactly the points on \(\ell\). Verify your equations by substituting your parametric formulas. How do the equations change from part (b)?
The direction has not changed, so we can keep the normals from part (b). Chapter 2.6 tells us how to find the new right-hand sides: take each normal’s dot product with the translation vector \(\vec p=\begin{bmatrix}-5\\7\\4\end{bmatrix}\).
So the common solutions are exactly the points on \(\ell\). Compared with part (b), the coefficients stay the same; only the right-hand sides change. Translating the line changes its location but preserves its direction.
d)
(2 pts) Give a geometric interpretation of your systems in parts (b) and (c): in each case, what type of object does each equation describe in \(\mathbb{R}^3\), and what is the connection between those two objects and the corresponding line (\(\ell_0\) or \(\ell\))?
Solution
Each equation describes a plane in \(\mathbb R^3\). Solving both equations means finding the points common to the two planes.
Part (b): The planes \(2x+3y=0\) and \(3x-2z=0\) both pass through the origin. Their intersection is the line \(\ell_0\).
Part (c): The planes \(2x+3y=11\) and \(3x-2z=-23\) intersect in the affine line \(\ell\). These planes are translations of those in part (b), so their normals stay the same, and \(\ell\) is parallel to \(\ell_0\).
In both systems, the normals are not scalar multiples, so the two planes intersect in a line.
Problem 3: Perfectly Normal (7 pts)
The point \(A=(8,11,9)\) lies on the plane \(P\) with equation
Every vector on \(P\) is perpendicular to this nonzero vector, so it is normal to \(P\).
b)
(4 pts) Find a parametric form for the line through \(A\) that is perpendicular to \(P\). Explain why your line passes through \(A\) and is perpendicular to \(P\).
Solution
Use \(A\) as the starting point and the normal from part (a) as the direction:
Equivalently, \(x=8+4t\), \(y=11-7t\), and \(z=9+5t\).
Our line passes through \(A\) because setting \(t=0\) gives \((8,11,9)\). It is perpendicular to \(P\) because its direction vector is the normal from part (a).
Problem 4: Common Ground (12 pts)
You might find desmos.com/3d useful for visualizing the planes in this question.
(4 pts) Find equations for \(P\) and \(Q\) in the form \(ax+by+cz=d\).
Solution
The equations are
$$ \boxed{P:\ 2x-3y+z=0,\qquad Q:\ x+2y-2z=0.} $$
Both planes are spans, so they contain the origin and have \(d=0\). To find their coefficients, we’ll use the method from Chapter 2.5: write an unknown normal \(\vec n=\begin{bmatrix}a\\b\\c\end{bmatrix}\) and require it to be perpendicular to both spanning vectors.
For \(P\): The two dot-product conditions are
$$ 5a+4b+2c=0,\qquad -4a+b+11c=0. $$
The second equation gives \(b=4a-11c\). Substitute into the first:
Then \(b=4(2c)-11c=-3c\). Choosing \(c=1\) gives \(\vec n_P=\begin{bmatrix}2\\-3\\1\end{bmatrix}\), and hence \(2x-3y+z=0\).
For \(Q\): This time the conditions are
$$ 4a-7b-5c=0,\qquad 8a+3b+7c=0. $$
Subtract twice the first equation from the second:
$$ 17b+17c=0\quad\Longrightarrow\quad b=-c. $$
Substituting into the first equation gives \(4a+2c=0\), or \(a=-c/2\). Choose \(c=-2\); then \(a=1\) and \(b=2\). Thus \(\vec n_Q=\begin{bmatrix}1\\2\\-2\end{bmatrix}\) and \(x+2y-2z=0\).
In each case, the two given spanning vectors are independent, so their span is a plane. The equation we found describes that same plane: its normal is perpendicular to both spanning directions, and it passes through the origin.
b)
(4 pts) The planes \(P\) and \(Q\) intersect in a line \(\ell\). Give a parametric description of \(\ell\), and write it as the span of a single vector.
Hint: Points on \(\ell\) satisfy both equations from part (a). Solve this system of two equations in three variables by eliminating variables.
Since \(z\) can be any real number, write \(z=7t\). This avoids fractions and gives \(x=4t\), \(y=5t\), \(z=7t\).
c)
(4 pts) Now, let \(R=\operatorname{span}(\vec{v}_2,\vec{v}_3)\). Find an equation for \(R\), and use it to find all points that belong to all three planes. What type of geometric object is their intersection?
Solution
An equation for the third plane is
$$ \boxed{R:\ 3x+y+z=0.} $$
As before, a normal \(\begin{bmatrix}a\\b\\c\end{bmatrix}\) must be perpendicular to both spanning vectors, so
$$ -4a+b+11c=0,\qquad 4a-7b-5c=0. $$
Adding the equations gives \(-6b+6c=0\), so \(b=c\). The first equation then becomes \(-4a+12c=0\), giving \(a=3c\). Choosing \(c=1\) gives the normal \(\begin{bmatrix}3\\1\\1\end{bmatrix}\) and the displayed equation.
A point belonging to all three planes must first belong to \(P\) and \(Q\), so part (b) tells us it has the form \((4t,5t,7t)\). For it to lie on \(R\) as well, we need
The intersection is therefore the single point\(\boxed{(0,0,0)}\).
Problem 5: Three Points, One Plane (13 pts)
Let \(A=(4,-7,5)\), \(B=(10,-3,7)\), and \(C=(-2,-1,13)\).
a)
(4 pts) Find vectors \(\vec{u}\) and \(\vec{v}\) pointing from \(A\) to \(B\) and from \(A\) to \(C\), respectively. Then, explain how you know these three points do not lie on one line.
Solution
Subtract the starting point from the ending point:
If the three points lay on one line, the two displacement vectors would be scalar multiples. Their first entries would require \(\vec v=-\vec u\), but the second entry of \(-\vec u\) is \(-4\), not \(6\). So they are independent, and the three points do not lie on one line.
b)
(5 pts) Find a nonzero normal vector to the plane through \(A\), \(B\), and \(C\).
They are scalar multiples, so \(A\), \(B\), and \(C\) lie on the same line. Any plane containing that line contains all three points, and there are infinitely many such planes. In part (b), we’ll construct two of them explicitly.
b)
(7 pts) Find equations for two distinct planes that contain all three points. Verify that both planes contain all three points, and explain how you know the planes are different.
Solution
Two possible planes are
$$ \boxed{7x-4y=-67,\qquad 5x+4z=-1.} $$
To construct them, find two independent normals perpendicular to the common line direction \(\begin{bmatrix}4\\7\\-5\end{bmatrix}\). Their entries must satisfy
$$ 4a+7b-5c=0. $$
Setting \(c=0\) gives the choice \(\vec n_1=\begin{bmatrix}7\\-4\\0\end{bmatrix}\). Setting \(b=0\) gives \(\vec n_2=\begin{bmatrix}5\\0\\4\end{bmatrix}\). Taking dot products with \(A\) supplies the constants:
Finally, the normals are not scalar multiples, so the planes have different orientations and are distinct. For a direct check, \((-5,8,0)\) is on the first plane, but not the second: \(5(-5)+4(0)=-25\ne-1\).
Problem 7: Changing the Spanning Vectors (7 pts)
Let \(\vec{u}\) and \(\vec{v}\) be nonzero vectors in \(\mathbb{R}^3\) that are not scalar multiples of one another, and let
$$ P=\operatorname{span}(\vec{u},\vec{v}). $$
For each pair below, determine whether it also spans \(P\).
If the pair does span \(P\), show how to write an arbitrary vector \(a\vec{u}+b\vec{v}\) as a linear combination of the new pair.
If the pair does not span \(P\), describe its span and give a vector that is in \(P\) but not in the span of the new pair.
a)
(4 pts) \(\vec{u}\) and \(\vec{u}+\vec{v}\).
Solution
Yes, this pair spans \(P\). We can rewrite any vector in \(P\) as
To see where the coefficients come from, expand an arbitrary combination of the new pair:
$$ c\vec u+d(\vec u+\vec v)=(c+d)\vec u+d\vec v. $$
To obtain \(a\vec u+b\vec v\), choose \(d=b\) and \(c=a-b\).
We also need the reverse direction: any combination of the new pair is a combination of \(\vec u\) and \(\vec v\), as the expansion shows. Thus both pairs produce exactly the same vectors, which is the span argument from Chapter 2.4.
b)
(3 pts) \(\vec{u}+\vec{v}\) and \(2(\vec{u}+\vec{v})\).
Solution
No, this pair spans only a line:
$$ \boxed{\operatorname{span}(\vec u+\vec v).} $$
The second vector is twice the first, so every combination has the form
Also, \(\vec u+\vec v\ne\vec0\): otherwise \(\vec v=-\vec u\), contradicting the assumption that they are not scalar multiples.
An example of a missing vector is \(\boxed{\vec u}\). It belongs to \(P\), but suppose it belonged to the new span. Then \(\vec u=t(\vec u+\vec v)\) for some \(t\). If \(t=0\), this says \(\vec u=\vec0\), a contradiction. If \(t\ne0\), rearranging gives
$$ \vec v=\frac{1-t}{t}\vec u, $$
again contradicting the assumption. Thus \(\vec u\) cannot belong to the new span.
Problem 8: Breaking It Down (15 pts)
Note: This problem involves content from Tuesday, September 29th’s lecture, and the soon-to-be-released Chapter 2.7.
Let \(\vec{v}=\begin{bmatrix}19\\2\\9\end{bmatrix}\).
a)
(3 pts) Find the orthogonal projection of \(\vec{v}\) onto the line
The projection is \(\boxed{\operatorname{proj}_{\ell}(\vec v)=\begin{bmatrix}4\\6\\12\end{bmatrix}}\). Let \(\vec w\) be the given direction vector. Using the projection formula from Chapter 2.3,
The squared length in the denominator accounts for the fact that \(\vec w\) is not a unit vector.
b)
(4 pts) Find the orthogonal projection of \(\vec{v}\) onto the plane \(P\) with equation \(2x+3y+6z=0\).
Hint: The line in part (a) is perpendicular to \(P\). What happens if you subtract the projection onto that line from \(\vec{v}\)?
Solution
The vector \(\begin{bmatrix}2\\3\\6\end{bmatrix}\) is normal to \(P\), so the line in part (a) is perpendicular to \(P\). Split \(\vec v\) into its component along that line and its component in the plane. Subtracting the first leaves the second:
Let’s check the geometry. The answer lies in \(P\) because \(2(15)+3(-4)+6(-3)=0\). The part we removed is normal to \(P\), so the error is perpendicular to the plane, as required for an orthogonal projection.
c)
(4 pts) Find the orthogonal projection of \(\vec{v}\) onto the plane
Let’s first find a normal, then subtract the component along it. If \(\vec n=\begin{bmatrix}a\\b\\c\end{bmatrix}\) is perpendicular to both spanning vectors, then
$$ 5a+4b-3c=0,\qquad -2a+6b+5c=0. $$
Multiply the first equation by \(5\) and the second by \(3\), then add:
$$ 19a+38b=0\quad\Longrightarrow\quad a=-2b. $$
Substituting into the first gives \(-6b-3c=0\), so \(c=-2b\). Choosing \(b=-1\) gives \(\vec n=\begin{bmatrix}2\\-1\\2\end{bmatrix}\). Thus \(Q\) has equation \(2x-y+2z=0\).
The component of \(\vec v\) along the normal line is
In this problem, we will explore the idea of reflecting a vector across a line. This problem has applications to computer graphics, where reflecting the position vectors of points creates a mirror image of a two-dimensional shape.
Let \(\vec w=\begin{bmatrix}1\\1\end{bmatrix}\). The picture below shows reflection of the vector \(\vec v=\begin{bmatrix}7\\-3\end{bmatrix}\) across the line \(\ell=\operatorname{span}(\vec w)=\operatorname{span}\left(\begin{bmatrix}1\\1\end{bmatrix}\right)\).
In the picture above, reflecting \(\vec{v}=\begin{bmatrix}7\\-3\end{bmatrix}\) across \(\ell=\operatorname{span}(\vec w)\) gives us \(\vec{v}_{\mathrm{ref}}=\begin{bmatrix}-3\\7\end{bmatrix}\). Notice that \(\vec{p}=\begin{bmatrix}2\\2\end{bmatrix}\), the projection of \(\vec{v}\) onto \(\ell=\operatorname{span}(\vec w)\), has its tip halfway between the tips of \(\vec v\) and \(\vec v_{\mathrm{ref}}\). To get from \(\vec{v}\) to \(\vec{v}_{\mathrm{ref}}\), we move to \(\vec{p}\), then keep going the same distance in the same direction.
We’ll use this same idea to reflect vectors across lines in \(\mathbb{R}^2\), \(\mathbb{R}^3\), and eventually \(\mathbb{R}^n\). All of the lines in this problem pass through the origin.
a)
(5 pts) Let \(\vec v=\begin{bmatrix}4\\3\end{bmatrix}\) and \(\vec w=\begin{bmatrix}1\\2\end{bmatrix}\).
(i)
Find the projection \(\vec p\) of \(\vec v\) onto \(\ell=\operatorname{span}(\vec w)\).
(ii)
Now, find \(\vec v_{\mathrm{ref}}\), the reflection of \(\vec v\) across \(\ell=\operatorname{span}(\vec w)\).
(iii)
Draw a picture showing \(\vec w\), \(\ell=\operatorname{span}(\vec w)\) (dotted, as in our example), \(\vec p\), \(\vec v\), and \(\vec v_{\mathrm{ref}}\).
Solution
(i) The projection is \(\boxed{\vec p=\begin{bmatrix}2\\4\end{bmatrix}}\). Using the direction vector \(\vec w\),
(iii) Here is the completed picture. The tip of \(\vec p\) is halfway between the tips of \(\vec v\) and \(\vec v_{\mathrm{ref}}\), and the dashed segment joining them is perpendicular to \(\ell=\operatorname{span}(\vec w)\).
b)
(2 pts) Now, let \(\vec w=\begin{bmatrix}1\\1\\2\end{bmatrix}\) and find the reflection of \(\vec{v}=\begin{bmatrix}3\\-1\\2\end{bmatrix}\) across the line \(\ell=\operatorname{span}(\vec w)\) in \(\mathbb{R}^3\). Again, start by finding \(\vec{p}\). You don’t need to draw a picture.
As in part (a), the tip of \(\vec p\) is the midpoint between the original tip and the reflected tip. Therefore,
$$ \vec v_{\mathrm{ref}}=2\vec p-\vec v =2\begin{bmatrix}1\\1\\2\end{bmatrix}-\begin{bmatrix}3\\-1\\2\end{bmatrix} =\begin{bmatrix}-1\\3\\2\end{bmatrix}. $$
c)
(3 pts) Let \(\vec{v}\in\mathbb{R}^n\), and let \(\ell=\operatorname{span}(\vec{w})\), where \(\vec{w}\) is nonzero. Find a formula for the reflection \(\vec{v}_{\mathrm{ref}}\) of \(\vec{v}\) across \(\ell=\operatorname{span}(\vec w)\). First, write your formula in terms of \(\vec{v}\) and its projection \(\vec{p}\) onto \(\ell=\operatorname{span}(\vec w)\). Then, write it using only \(\vec{w}\), \(\vec{v}\), and their dot products.
Let’s see why. Going from the tip of \(\vec v\) to the tip of \(\vec p\) adds \(\vec p-\vec v\). The reflection continues the same distance in the same direction, so it adds this vector twice:
Now substitute the projection formula \(\vec p=\dfrac{\vec v\cdot\vec w}{\vec w\cdot\vec w}\vec w\) to get the second expression. The denominator is nonzero because \(\vec w\ne\vec0\).
Equivalently, the perpendicular decomposition \(\vec v=\vec p+(\vec v-\vec p)\) becomes \(\vec p-(\vec v-\vec p)\). Reflection keeps the component along the line and reverses the perpendicular component.
Problem 10: Programming Activity (7 pts)
Let’s implement your logic from Problem 9 in Python! In Homework 1, you changed the colors of pixels in an image. This time, you’ll change their positions to create a mirror image, while keeping the colors the same.
You won’t need to submit the notebook anywhere. To get credit, complete both tasks in the notebook and include the following in your PDF submission to Homework 4 on Pensive, specifically under Problem 10:
1.
Task 1 (5 pts): A screenshot of your completed reflection(v, w) function and the successful check output.
2.
Task 2 (2 pts): One screenshot of your canvas with a tilted line, showing the angle, original image, and reflected image. No written response is required.
The first line of the function computes the projection onto \(\operatorname{span}(\vec w)\); the second uses the reflection formula from Problem 9. This implementation passes all six supplied checks, including the two examples with direction vectors that span the same line.
Task 2: Images will vary. The screenshot should show a tilted line and its angle, with the original image and reflected image on opposite sides. Corresponding points should be equally far from the line, and the segment joining each pair should be perpendicular to it.