Example5.2.1
Let \(A\) be a subspace of \(\mathbb{R}3\) of dimension 2 and let \(\vec{b}\) be
a fixed non-zero vector in \(\mathbb{R}3\).
Let \(A′\) denote the subset of \(\mathbb{R}3\) consisting of all vectors of the
form \(\vec{a} + \vec{b}\) where \(\vec{a}\) is in the
subspace \(A\).
For which vectors \(\vec{b}\) is \(A′\) also a subspace? Justify your answer.
[7 marks]
Before grappling this problem it helps to get a picture. I believe this is the best way to approach any problem.
(Maybe this is just the old physicist in me). Sometimes it is not possible but not very often.
So lets first look at how SageMath can help us here. Since \(A\) is a subspace \(\mathbb{R}3\) then it must
be a plane passing through the origin; subspaces must contain the \(\left\{0\right\}\) vector and pass through the origin.
Take, for example, the plane passing through the origin given by:
\begin{equation*}2 x - 4 y + 2 z = 0\end{equation*}
Consider the case where our vector \(\vec{a}\) is the direction vector starting at position \((2,2,2)\)
and extending to \((3,4,5)\). This lies on the plane going through the origin and is our subspace \(A\).
Let the point \(P\) be the start of \(\vec{a}\) and the point \(Q\) be the endpoint.
These points are also the position vectors \(\vec{OP}\) and \(\vec{OQ}\) and also lie on the
plane (since the origin is on the plane). Hence, a normal to the plane is given by the cross-product:
\begin{equation*}\vec{n} = \vec{OP} \times \vec{a}\end{equation*}
(We could have taken the cross product of any of these three vectors since they are all in the same plane.)
We know that the dot product of the normal \(\vec{n}\) with any of our three vectors should be zero. This
enables us to use implicit_plot3d() passing in an equation for any point on the plane.
We have defined \(f(x,y,z)\) as the function to represent any point on this plane. In the sage cell
this is achieved by the following technique:
p = vector([x, y, z])
pA = a - p
f(x,y,z) = n.dot_product(pA)
The resultant function is:
\begin{equation*}2 x - 4 y + 2 z = 0\end{equation*}
This confirms our initial equation above.
Now we have all we need to plot the plane. There are several ways of plotting this plane in SageMath.
The one adopted here is to use implicit_plot3d(). We pass into this method the above
function \(f\) set equal to zero and the \(x,y,z\) ranges. The next Sage Cell brings this together.
Our vector \(\vec{a}\) is the yellow arrow, the origin is shown as the black dot in the centre,
the plane is drawn in blue.
Now add another vector \(\vec{b}\) which is also on the same plane. This shown as the green arrow.
To do this we introduce another point \(S=(-1,2,5)\). You might wonder how we know that this
point lies on our plane. It was found using the following trick.
f=n[0]*x+n[1]*y+n[2]*z==0
show(f(x=-1,y=2))
Here \(n[0]\) is the \(x\)-coordinate of the normal, \(n[1]\) is the \(y\)-coordinate, and so on.
They are the coefficients of the standard equation of a plane (\(a x + b y + c z = d\)). With \(d = 0\)
is the plane case when the plane passes through the origin. The results are: \begin{equation*}2 z - 10 = 0\end{equation*}
From this, we can find the \(z\)-coordinate of \(S\) which ensure that the point fits onto
our plane.
Now for the full picture. Lets find another vector \(\vec{c}\) that does not lie on our plane.
Lets also form another plane which contains this new vector and vector \(\vec{a}\) (the yellow arrow).
Try the point \(R=(5,0,3)\).
Evaluating the following SageCell and playing with the resultant plot (zooming in and out and rotating)
should convince you of the official Edinburgh University solution 5.2.1 to the problem.
Solution
Proposition5.2.2
\(A'\) is a subspace if and only if \(\vec{b} \in A\).
If \(A \subset \mathbb{R}3\) be a subspace of rank 2 then it is a plane through the origin.
If \(\vec{x} \in A\) then
\begin{equation*}\vec{x} = t_1 \vec{v_1} + t_2 \vec{v_2}\end{equation*}
for direction vectors \(\vec{v_1},\vec{v_2}\).
If \(\vec{b} \in A\)and \(\vec{b} \ne 0\) then
\begin{equation*}\vec{b} = b_1 \vec{v_1} + b_2 \vec{v_2}\end{equation*}
and so \(A'\) is
\begin{equation*}A′ = \{ t_1\vec{v_1} + t_2 \vec{v_2} + b_1 \vec{v_1} + b_2 \vec{v_2} | t_1,t_2 \in \mathbb{R} \}\end{equation*}
\begin{equation*} = \{ (t_1 + b_1)\vec{v_1} + (t_2 + b_2)\vec{v_2} | t_1,t_2 \in \mathbb{R} \}\end{equation*}
\begin{equation*} = \{ s_1 \vec{v_1} + s_2 \vec{v_2} | s_1,s_2 \in \mathbb{R} \}\end{equation*}
\begin{equation*} = A\end{equation*}
Hence \(A'\) is also a plane through the origin.
If \(\vec{b} \notin A\) then
\begin{equation*}A′ = \{ \vec{b} + t_1 \vec{v_1} + t_2 \vec{v_2} | t_1,t_2 \in \mathbb{R} \}\end{equation*}
which is a plane not through the origin, and so is not a subspace.
(This is hopefully illustrated with the Sage Cell simulation.)