Lab 4: Lines and Planes in $\mathbb{R}^3$

due by the end of class on Wednesday, September 23, 2026

Each lab worksheet will contain several activities, most of which will involve writing math on paper, and some of which will involve running code in a Jupyter Notebook. To receive credit for today’s lab, you must show your lab TA your work on this worksheet.

While you must get checked off by your lab TA individually, we encourage you to form groups with 1-2 other students to complete the activities together.


Activities


Today’s lab is split into two parts, all of which are covered in Chapter 2.4 of the course notes:

  • Activities 1-4 involve content from the previous two lectures.

  • Activities 5-8 involve affine lines and planes in \(\mathbb{R}^3\) – that is, objects that don’t necessarily pass through the origin, \((0,0,0)\). We will give a brief overview of these in lab and revisit them in tomorrow’s lecture. (Activities 5-8 are the same as Questions 5-8 from yesterday’s lecture worksheet, which we didn’t get to.)


Activity 1: The Span of One Vector

The line \(\ell\) is given in scalar-parametric form by

$$ x=5t,\qquad y=-9t,\qquad z=2t,\qquad t\in\mathbb{R}. $$
a)

Find a vector \(\vec{u}\) such that \(\ell=\operatorname{span}(\vec{u})\).

Solution

The line \(\ell\) consists of all scalar multiples of a single direction vector. Any nonzero point on \(\ell\) gives such a direction vector; setting \(t=1\) is convenient because we can read the coefficients directly:

$$ \vec{u}=\begin{bmatrix}5\\-9\\2\end{bmatrix}. $$

Then every point on \(\ell\) has the form \(t\vec{u}\), so

$$ \ell=\{t\vec{u}:t\in\mathbb{R}\}=\operatorname{span}(\vec{u}). $$
b)

Find a different vector with the same span. Explain why your vector describes the same line.

Solution

Scaling a direction vector does not change the line it determines. Any nonzero scalar multiple of \(\vec{u}\) has the same span. For example,

$$ \vec{w}=\begin{bmatrix}10\\-18\\4\end{bmatrix}=2\vec{u}. $$

To see that \(\operatorname{span}(\vec{w})=\operatorname{span}(\vec{u})\), we check both containments. If \(\vec{x}\in\operatorname{span}(\vec{w})\), then \(\vec{x}=c\vec{w}=c(2\vec{u})=(2c)\vec{u}\in\operatorname{span}(\vec{u})\). Conversely, if \(\vec{x}=t\vec{u}\), then \(\vec{x}=\frac{t}{2}\vec{w}\in\operatorname{span}(\vec{w})\). So the two spans are equal and describe the same line through the origin.


Activity 2: The Same Plane, Different Directions

The plane \(P\) is given in scalar-parametric form by

$$ x=s+t,\qquad y=s-t,\qquad z=2t,\qquad s,t\in\mathbb{R}. $$
a)

Find vectors \(\vec{u}\) and \(\vec{v}\) such that \(P=\operatorname{span}(\vec{u},\vec{v})\).

Solution

Rewrite the parametric equations as a linear combination of two vectors, one for each parameter:

$$ \begin{bmatrix}x\\y\\z\end{bmatrix} = s\begin{bmatrix}1\\1\\0\end{bmatrix} + t\begin{bmatrix}1\\-1\\2\end{bmatrix}, \qquad s,t\in\mathbb{R}. $$

The coefficients of \(s\) and \(t\) are the spanning vectors, so one choice is

$$ \vec{u}=\begin{bmatrix}1\\1\\0\end{bmatrix}, \qquad \vec{v}=\begin{bmatrix}1\\-1\\2\end{bmatrix}. $$
b)

Are \(\vec{u}\) and \(\vec{v}\) the only pair of vectors that span \(P\)? Compute \(\vec{u}+\vec{v}\) and \(\vec{u}-\vec{v}\), and explain why this pair also spans \(P\). Hint: Can you write each of \(\vec{u}\) and \(\vec{v}\) as a linear combination of \(\vec{u}+\vec{v}\) and \(\vec{u}-\vec{v}\)?

Solution

No. A plane has many (in fact, infinitely!) pairs of spanning vectors. Any two vectors that live on the plane that are not scalar multiples of each other span the plane. Using the vectors from part (a),

$$ \vec{u}+\vec{v}=\begin{bmatrix}2\\0\\2\end{bmatrix}, \qquad \vec{u}-\vec{v}=\begin{bmatrix}0\\2\\-2\end{bmatrix}. $$

The key observation is that each original spanning vector is a linear combination of this new pair:

$$ \vec{u}=\tfrac12(\vec{u}+\vec{v})+\tfrac12(\vec{u}-\vec{v}), \qquad \vec{v}=\tfrac12(\vec{u}+\vec{v})-\tfrac12(\vec{u}-\vec{v}). $$

So every vector in \(\operatorname{span}(\vec{u},\vec{v})\) can be built from \(\vec{u}+\vec{v}\) and \(\vec{u}-\vec{v}\), and vice versa. Therefore

$$ \operatorname{span}(\vec{u},\vec{v}) = \operatorname{span}(\vec{u}+\vec{v},\vec{u}-\vec{v}). $$
c)

Use \(\vec{u}+\vec{v}\) and \(\vec{u}-\vec{v}\) to write a different scalar-parametric form for \(P\). Write your answer as equations for \(x\), \(y\), and \(z\), and state the possible values of your parameters.

Solution

Replace \(\vec{u}\) and \(\vec{v}\) with \(\vec{u}+\vec{v}\) and \(\vec{u}-\vec{v}\) in the vector form from part (a). Using parameters \(s,t\in\mathbb{R}\),

$$ \begin{bmatrix}x\\y\\z\end{bmatrix} = s\begin{bmatrix}2\\0\\2\end{bmatrix} + t\begin{bmatrix}0\\2\\-2\end{bmatrix}. $$

Reading off components gives

$$ x=2s,\qquad y=2t,\qquad z=2s-2t,\qquad s,t\in\mathbb{R}. $$

This is a different parametrization of the same plane. For example, the original form with \(s=1,t=0\) gives \((1,1,0)\), and here that point occurs when \(s=\tfrac12,t=\tfrac12\).


Activity 3: A Plane in Two Forms

Let

$$ \vec{u}=\begin{bmatrix}5\\-7\\3\end{bmatrix},\qquad \vec{v}=\begin{bmatrix}4\\1\\-2\end{bmatrix},\qquad P=\operatorname{span}(\vec{u},\vec{v}). $$
a)

Write \(P\) in scalar-parametric form by writing three separate equations: one for \(x\), one for \(y\), and one for \(z\). All three should use the same two parameters, \(s,t\in\mathbb{R}\).

Solution

Since \(P=\operatorname{span}(\vec{u},\vec{v})\), every point in \(P\) has the form \(s\vec{u}+t\vec{v}\):

$$ \begin{bmatrix}x\\y\\z\end{bmatrix} = s\begin{bmatrix}5\\-7\\3\end{bmatrix} + t\begin{bmatrix}4\\1\\-2\end{bmatrix}, \qquad s,t\in\mathbb{R}. $$

Reading off components gives

$$ x=5s+4t,\qquad y=-7s+t,\qquad z=3s-2t,\qquad s,t\in\mathbb{R}. $$
b)

Find a nonzero vector \(\vec{n}\) that is perpendicular to both \(\vec{u}\) and \(\vec{v}\). Verify your answer using dot products.

Solution

A vector normal to the plane must be orthogonal to both spanning vectors. If \(\vec{n}=\begin{bmatrix}a\\b\\c\end{bmatrix}\), then

$$ \vec{n}\cdot\vec{u}=5a-7b+3c=0, \qquad \vec{n}\cdot\vec{v}=4a+b-2c=0. $$

From the second equation, \(b=-4a+2c\). Substituting into the first gives \(33a-11c=0\), so \(c=3a\) and \(b=2a\). Taking \(a=1\) gives

$$ \vec{n}=\begin{bmatrix}1\\2\\3\end{bmatrix}. $$

Verification:

$$ \vec{n}\cdot\vec{u}=5-14+9=0, \qquad \vec{n}\cdot\vec{v}=4+2-6=0. $$

Any nonzero scalar multiple of \(\vec{n}\) is also correct.

c)

Use \(\vec{n}\) to write a linear equation of the form \(ax+by+cz=0\) for \(P\). Graph your equation on Desmos, desmos.com/3d.

Solution

Because \(P\) passes through the origin, every point \(\begin{bmatrix}x\\y\\z\end{bmatrix}\) in \(P\) satisfies \(\vec{n}\cdot\begin{bmatrix}x\\y\\z\end{bmatrix}=0\). With \(\vec{n}=\begin{bmatrix}1\\2\\3\end{bmatrix}\), this becomes

$$ x+2y+3z=0. $$

On Desmos 3D, graph this equation. It should match the parametric plane from part (a): same plane, just written in a different form.


Activity 4: A Line in Equation Form

Consider the line from Activity 1:

$$ \ell=\operatorname{span}\left(\begin{bmatrix}5\\-9\\2\end{bmatrix}\right). $$
a)

Find two vectors that are both orthogonal to \(\begin{bmatrix}5\\-9\\2\end{bmatrix}\) and are not scalar multiples of each other, i.e. two linearly independent vectors on \(\ell^\perp\).

Solution

We need two linearly independent vectors in \(\ell^\perp\), the plane of vectors orthogonal to \(\ell\). If \(\vec{n}=\begin{bmatrix}a\\b\\c\end{bmatrix}\) is orthogonal to \(\vec{d}=\begin{bmatrix}5\\-9\\2\end{bmatrix}\), then

$$ 5a-9b+2c=0. $$

We can find two different solutions by setting convenient variables to zero. Setting \(a=0\) and \(b=2\) gives \(c=9\), so

$$ \vec{n}_1=\begin{bmatrix}0\\2\\9\end{bmatrix}. $$

Setting \(b=0\) and \(a=-2\) gives \(c=5\), so

$$ \vec{n}_2=\begin{bmatrix}-2\\0\\5\end{bmatrix}. $$

Check orthogonality:

$$ \vec{n}_1\cdot\vec{d}=0-18+18=0, \qquad \vec{n}_2\cdot\vec{d}=-10+0+10=0. $$

These two vectors are not scalar multiples of each other, so they form a basis for \(\ell^\perp\).

b)

Use those vectors to write a system of two linear equations and three unknowns (\(x\), \(y\), and \(z\)) whose solution set is the line \(\ell\).

Solution

Each vector \(\vec{n}_i\) is normal to a plane through the origin. A point \(\begin{bmatrix}x\\y\\z\end{bmatrix}\) lies on that plane exactly when \(\vec{n}_i\cdot\begin{bmatrix}x\\y\\z\end{bmatrix}=0\). Since \(\ell\) passes through the origin, it is the intersection of the two planes orthogonal to \(\vec{n}_1\) and \(\vec{n}_2\):

$$ \begin{cases} \vec{n}_1\cdot\begin{bmatrix}x\\y\\z\end{bmatrix}=0 \;\;\Longleftrightarrow\;\; 2y+9z=0,\\[4pt] \vec{n}_2\cdot\begin{bmatrix}x\\y\\z\end{bmatrix}=0 \;\;\Longleftrightarrow\;\; -2x+5z=0. \end{cases} $$

A point lies on \(\ell\) exactly when it satisfies both equations.

c)

Graph both equations on Desmos, desmos.com/3d. What do they look like?

Solution

Each equation describes a plane through the origin in \(\mathbb{R}^3\). On Desmos, you should see two flat sheets that cross along a single line. That intersection line is exactly

$$ \ell=\operatorname{span}\!\left(\begin{bmatrix}5\\-9\\2\end{bmatrix}\right). $$

This illustrates the general idea: a line through the origin can be described as the intersection of two planes through the origin.

The remaining activities are about affine lines and planes – that is, objects that don’t necessarily pass through the origin, \((0,0,0)\). These are discussed at the bottom of Chapter 2.4. We will give a brief overview ~an hour into lab to help you get started.


Activity 5: An Affine Line in Parametric Form

Let \(\displaystyle \ell’ = \begin{bmatrix} 1\\ 2\\ -1 \end{bmatrix} + \operatorname{span} \left( \begin{bmatrix} 2\\ -1\\ 3 \end{bmatrix} \right).\)

a)

Write \(\ell’\) explicitly in vector-parametric form.

$$ \ell' = \left\{ \hspace{11cm} \right\}. $$
Solution

The notation \(\vec{p}+\operatorname{span}(\vec{d})\) means: start at the point \(\vec{p}\), then add every scalar multiple of \(\vec{d}\). Here \(\vec{p}=\begin{bmatrix}1\\2\\-1\end{bmatrix}\) and \(\vec{d}=\begin{bmatrix}2\\-1\\3\end{bmatrix}\), so

$$ \ell' = \left\{ \begin{bmatrix}1\\2\\-1\end{bmatrix} + t\begin{bmatrix}2\\-1\\3\end{bmatrix} : t\in\mathbb{R} \right\}. $$

When \(t=0\), we get the point \((1,2,-1)\); changing \(t\) moves along the line in the direction of \(\vec{d}\).

b)

Write the corresponding scalar-parametric equations for \(x\), \(y\), and \(z\).

$$ \begin{aligned} x&=\underline{\hspace{4cm}},\\[5pt] y&=\underline{\hspace{4cm}},\\[5pt] z&=\underline{\hspace{4cm}}. \end{aligned} $$
Solution

Expand the vector sum component-wise:

$$ \begin{bmatrix}x\\y\\z\end{bmatrix} = \begin{bmatrix}1\\2\\-1\end{bmatrix} + t\begin{bmatrix}2\\-1\\3\end{bmatrix} = \begin{bmatrix}1+2t\\2-t\\-1+3t\end{bmatrix}. $$

So

$$ \begin{aligned} x&=1+2t,\\[5pt] y&=2-t,\\[5pt] z&=-1+3t. \end{aligned} $$
c)

Graph \(\ell’\) on Desmos, desmos.com/3d. To get the entire line to appear, you may have to change the upper and lower bounds for \(t\).

Solution

In Desmos 3D, enter the parametric curve \((1+2t,2-t,-1+3t)\). Unlike a line through the origin, this affine line passes through \((1,2,-1)\) but not through \((0,0,0)\). You may need to widen the bounds for \(t\) so the entire line appears on screen.


Activity 6: An Affine Plane in Parametric Form

Now let’s switch to discussing affine planes. Let \(\displaystyle P’ = \begin{bmatrix} 2\\ -1\\ 4 \end{bmatrix} + \operatorname{span} \left( \begin{bmatrix} 1\\ 2\\ -1 \end{bmatrix}, \begin{bmatrix} 2\\ -1\\ 3 \end{bmatrix} \right).\)

a)

Write \(P’\) explicitly in vector-parametric form using two parameters \(s\) and \(t\).

$$ P' = \left\{ \hspace{11cm} \right\}. $$
Solution

An affine plane is a base point plus all linear combinations of two direction vectors. Here the base point is \(\begin{bmatrix}2\\-1\\4\end{bmatrix}\), and the plane is spanned by \(\begin{bmatrix}1\\2\\-1\end{bmatrix}\) and \(\begin{bmatrix}2\\-1\\3\end{bmatrix}\):

$$ P' = \left\{ \begin{bmatrix}2\\-1\\4\end{bmatrix} + s\begin{bmatrix}1\\2\\-1\end{bmatrix} + t\begin{bmatrix}2\\-1\\3\end{bmatrix} : s,t\in\mathbb{R} \right\}. $$

When \(s=t=0\), we get the point \((2,-1,4)\).

b)

Write the corresponding scalar-parametric equations for \(x\), \(y\), and \(z\).

$$ \begin{aligned} x&=\underline{\hspace{4cm}},\\[5pt] y&=\underline{\hspace{4cm}},\\[5pt] z&=\underline{\hspace{4cm}}. \end{aligned} $$
Solution

Add the base point to the linear combination from part (a):

$$ \begin{bmatrix}x\\y\\z\end{bmatrix} = \begin{bmatrix}2\\-1\\4\end{bmatrix} + s\begin{bmatrix}1\\2\\-1\end{bmatrix} + t\begin{bmatrix}2\\-1\\3\end{bmatrix}. $$

Reading off components gives

$$ \begin{aligned} x&=2+s+2t,\\[5pt] y&=-1+2s-t,\\[5pt] z&=4-s+3t. \end{aligned} $$
c)

Graph \(P’\) on Desmos. Start with https://www.desmos.com/3d/llepnyv69l (found by Googling “plane in parametric form on Desmos”) and make modifications as necessary.

Solution

Use the scalar-parametric equations from part (b) in Desmos 3D. The graph should be a flat sheet through \((2,-1,4)\). It is an affine plane because it does not necessarily pass through the origin: setting \(s=t=0\) gives \((2,-1,4)\), but there is no choice of \(s,t\) that produces \((0,0,0)\).


Activity 7: An Equation for an Affine Plane

Consider the affine plane from Activity 6: \(\displaystyle P’ = \begin{bmatrix} 2\\ -1\\ 4 \end{bmatrix} + \operatorname{span} \left( \begin{bmatrix} 1\\ 2\\ -1 \end{bmatrix}, \begin{bmatrix} 2\\ -1\\ 3 \end{bmatrix} \right).\)

a)

Find a nonzero normal vector \(\vec n\) perpendicular to both spanning vectors above.

Solution

The normal vector must be orthogonal to both spanning vectors. If \(\vec{n}=\begin{bmatrix}a\\b\\c\end{bmatrix}\), then

$$ a+2b-c=0, \qquad 2a-b+3c=0. $$

From the first equation, \(c=a+2b\). Substituting into the second gives \(5a+5b=0\), so \(b=-a\) and \(c=-a\). One choice is

$$ \vec{n}=\begin{bmatrix}1\\-1\\-1\end{bmatrix}. $$

Verification:

$$ \vec{n}\cdot\begin{bmatrix}1\\2\\-1\end{bmatrix}=1-2+1=0, \qquad \vec{n}\cdot\begin{bmatrix}2\\-1\\3\end{bmatrix}=2+1-3=0. $$
b)

A point \(\displaystyle \begin{bmatrix} x\\ y\\ z \end{bmatrix}\) lies in \(P’\) when \(\displaystyle \vec n\cdot \begin{bmatrix} x\\ y\\ z \end{bmatrix} = \vec n\cdot \begin{bmatrix} 2\\ -1\\ 4 \end{bmatrix}.\)

Compute the constant on the right-hand side.

$$ \vec n\cdot \begin{bmatrix} 2\\ -1\\ 4 \end{bmatrix} = \underline{\hspace{4cm}}. $$
Solution

Using \(\vec n=\begin{bmatrix}1\\-1\\-1\end{bmatrix}\) from the previous part, we get

$$ \vec{n}\cdot\begin{bmatrix}2\\-1\\4\end{bmatrix} =(1)(2)+(-1)(-1)+(-1)(4) =2+1-4=-1. $$
c)

Write an equation for \(P’\) in dot-product form.

$$ \vec n\cdot \begin{bmatrix} x\\ y\\ z \end{bmatrix} = \underline{\hspace{2cm}}. $$
Solution

Substitute the constant from part (b):

$$ \vec{n}\cdot\begin{bmatrix}x\\y\\z\end{bmatrix}=-1. $$

This is the dot-product form of the affine plane equation.

d)

Write a linear equation of the form \(ax+by+cz=d\) for \(P’\).

Solution

Expanding the dot product gives

$$ x-y-z=-1. $$

Notice that the right-hand side is \(-1\), not \(0\), because \(P’\) does not pass through the origin.

e)

Graph your equation for \(P’\) on Desmos, desmos.com/3d. Compare the graph with the one you made in Activity 6(c).

Solution

The graph of \(x-y-z=-1\) should match the parametric plane from Activity 6. Both describe the same affine plane \(P’\); one uses parameters \(s,t\), the other uses a single linear equation. You can check that \((2,-1,4)\) satisfies \(2-(-1)-4=-1\).


Activity 8: An Affine Line as the Solution of a Linear System

Finally, let’s return to the affine line from Activity 5: \(\displaystyle \ell’ = \begin{bmatrix} 1\\ 2\\ -1 \end{bmatrix} + \operatorname{span} \left( \begin{bmatrix} 2\\ -1\\ 3 \end{bmatrix} \right).\)

a)

Find two normal vectors \(\vec n_1\) and \(\vec n_2\) perpendicular to the direction vector above that are not scalar multiples of each other.

Solution

Use the same method as Activity 4, but with the correct direction vector for this line. If \(\vec{n}=\begin{bmatrix}a\\b\\c\end{bmatrix}\) is orthogonal to \(\vec{d}=\begin{bmatrix}2\\-1\\3\end{bmatrix}\), then

$$ 2a-b+3c=0. $$

Setting \(a=0\) and \(b=3\) gives \(c=1\), so

$$ \vec{n}_1=\begin{bmatrix}0\\3\\1\end{bmatrix}. $$

Setting \(b=0\) and \(a=-3\) gives \(c=2\), so

$$ \vec{n}_2=\begin{bmatrix}-3\\0\\2\end{bmatrix}. $$

Check:

$$ \vec{n}_1\cdot\vec{d}=0-3+3=0, \qquad \vec{n}_2\cdot\vec{d}=-6+0+6=0. $$

These are not scalar multiples of each other.

b)

A point \(\displaystyle \begin{bmatrix} x\\ y\\ z \end{bmatrix}\) lies on \(\ell’\) when \(\displaystyle \vec n_1\cdot \begin{bmatrix} x\\ y\\ z \end{bmatrix} = \vec n_1\cdot \begin{bmatrix} 1\\ 2\\ -1 \end{bmatrix}\) and \(\displaystyle \vec n_2\cdot \begin{bmatrix} x\\ y\\ z \end{bmatrix} = \vec n_2\cdot \begin{bmatrix} 1\\ 2\\ -1 \end{bmatrix}.\)

Compute the two constants on the right-hand sides.

$$ \vec n_1\cdot \begin{bmatrix} 1\\ 2\\ -1 \end{bmatrix} = \underline{\hspace{3cm}}, \qquad \vec n_2\cdot \begin{bmatrix} 1\\ 2\\ -1 \end{bmatrix} = \underline{\hspace{3cm}}. $$
Solution

Use the base point \(\begin{bmatrix}1\\2\\-1\end{bmatrix}\) on \(\ell’\):

$$ \vec{n}_1\cdot\begin{bmatrix}1\\2\\-1\end{bmatrix} =0+6-1=5, $$
$$ \vec{n}_2\cdot\begin{bmatrix}1\\2\\-1\end{bmatrix} =-3+0-2=-5. $$

Because \(\ell’\) is affine, these constants are generally nonzero.

c)

Write a system of two linear equations and three unknowns (\(x\), \(y\), and \(z\)) whose solution set is \(\ell’\).

Solution

Each normal vector determines a plane. A point lies on \(\ell’\) when it lies on both planes, so

$$ \begin{cases} \vec{n}_1\cdot\begin{bmatrix}x\\y\\z\end{bmatrix}=5 \;\;\Longleftrightarrow\;\; 3y+z=5,\\[4pt] \vec{n}_2\cdot\begin{bmatrix}x\\y\\z\end{bmatrix}=-5 \;\;\Longleftrightarrow\;\; -3x+2z=-5. \end{cases} $$

Each equation describes a plane, and their intersection is the affine line \(\ell’\).

d)

Graph both equations in your system on Desmos, desmos.com/3d. The two planes should intersect in the affine line \(\ell’\). Compare the intersection with the graph from Activity 5(c).

Solution

On Desmos, graph the two planes \(3y+z=5\) and \(-3x+2z=-5\). They should intersect in the same affine line as the parametric graph from Activity 5(c). Unlike Activity 4, the planes here do not pass through the origin, which is why the right-hand sides are nonzero.