Find the distance of the shortest air route at an altitude of 6000
metres between London and Cape Town given the latitudes and
longitudes. A simple application of scalar products of vectors.

Cross with the Scalar Product

Stage: 5 Challenge Level:

Steve writes:

The scalar product between two vectors is the sum of the product of the components. Let
$$
{\bf u} =\pmatrix{x\cr y\cr z}
$$
Since the components of $\bf v$ are all non-zero I can choose anything for $y$ and $z$ so long as I choose $x= -(2y+3z)$. This is the equation of a plane $P: x+2y+3z=0$, which is perpendicular to the vector ${\bf v}$. This makes sense: the scalar product of two vectors is zero if and only if they are perpendicular to each other.

Next, taking a cross product between two vectors always gives a vector which is perpendicular to the original two vectors. So, I should be able to make any vector perpendicular to ${\bf v}$ by taking cross products. These are all vectors lying in the plane $P$.

To decide which vectors ${\bf u}$ solve ${\bf u}\cdot {\bf v}=0$ for a given vector ${\bf v}$ I need to decide which vectors are perpendicular to ${\bf v}$.

To do this, I could take any linear combination of ${\bf i \times v}, {\bf j \times v}$ and ${\bf j \times v}$

From this it seems that I just need to switch 2 non-zero components and change the sign of one of them to make a vector perpendicular to a given vector. In hindsight, this is obvious!

Doug writes:

Solution 2:

Dot $\begin{pmatrix}
1\\
2\\
3\\
\end{pmatrix}$ with a general vector $\begin{pmatrix}
a\\
b\\
c\\
\end{pmatrix}$ and you want to find a,b,c such that a + 2b + 3c = 0, so for example a = -2b - 3c, so there are an infinite number of solutions. Pick any 2 and find the other one, for example c=1,b=1,a=-5.

For the 2nd part, again cross $\mathbf{v}$, using a general vector, and find with the "determinant method":
$$\begin{vmatrix}
\mathbf{i}&\mathbf{j}&\mathbf{k}\\
1&2&3\\
a&b&c\\
\end{vmatrix} = \begin{pmatrix}
2c-3b\\
3a-c\\
b-2a\\
\end{pmatrix},$$ so again you can choose a,b,c such that this is satisfied, and there are an infinite number of possibilities.

To quickly create a vector $\mathbf{u}$ such that $\mathbf{u}\cdot\mathbf{v} = \mathbf{0}$, I first looked at the general case with vectors $\begin{pmatrix}
a\\
b\\
c\\
\end{pmatrix}$ and $\begin{pmatrix}
d\\
e\\
f\\
\end{pmatrix}$ so ad+be+cf = 0, so I could choose any 2 numbers e & f, then calculate $d = \frac{-(be+cf)}{a}$. But we want to do this "quickly", so we might simplify $e=f=-1$, which gives $$ \mathbf{u} = \begin{pmatrix}
x\\
-1\\
-1\\
\end{pmatrix},$$ where $x = \frac{b+c}{a}$.

However, when I tried this solution on the examples given, I found that with the final example, there was a divide by zero error.

To get round this, we instead add a caveat to the algorithm to swap a,b,c to ensure that there is a non-zero denominator. So in the final case, we set $y = \frac{a+c}{b} = 0 \Rightarrow \begin{pmatrix}
0\\
1\\
0\\
\end{pmatrix}\cdot\begin{pmatrix}
-1\\
0\\
-1\\
\end{pmatrix} = 0$.

In general, the cross product of two vectors is: $$\begin{pmatrix}
a\\
b\\
c\\
\end{pmatrix}\times\begin{pmatrix}
d\\
e\\
f\\
\end{pmatrix} = \begin{pmatrix}
bf-ce\\
cd-af\\
ae-bd\\
\end{pmatrix}$$ so if we let f=e=0, and d=1, then $\mathbf{w} = \begin{pmatrix}
0\\
c\\
-b\\
\end{pmatrix}$ is always the result of crossing $\mathbf{v}$ with $\begin{pmatrix}
1\\
0\\
0\\
\end{pmatrix}$, for example, which is probably the most efficient method of calculating this.

This gives us a relationship between the components of ${\bf z}$ and ${\bf w}$ in the form of 3 simultaneous equations.
Solving equation 1 and equation 3 simultaneously:
from equation3 we find that $z_2 = w_3 +2z_2$
if we now sustitute $z_2$ into equation1 we find that $-6z_1 + 2z_3 = 3w_3 + w_1$
This result is actually equation2 but scaled which implies that there are actually only two independent equations but still 3 unknows $( z_1, z_2, z_3)$. We are therefore unable to find a unique solution, there are once again an infinite number of solutions.

An alternative method of deducing this result would be to rewrite the equations in matrix form, a 0 determinant to this matrix would indicate that there are an infinite number of solutions.

Note: The above matrix is anti-symmetric, an anti-symmetric matrix of this form always results from taking the cross product of two vectors, the determinant of an odd order (in this case 3 x 3) anti-symmetric matrx will always give a zero determinant.

If ${\bf V}\cdot {\bf U}$ = 0 then the two vectors are orthogonal, to determine ${\bf u}$ we therefore need to find a vector which is perpendicular to ${\bf v}$

Define vector ${\bf z}$= $\pmatrix {z_1\cr z_2\cr z_3}$

The cross product of any 2 vectors will yield a vector perpendicular to both of the original vectors, the cross product of ${\bf v}$ and ${\bf z}$ will therefore give a vector which is perpendicular to ${\bf v}$ (and ${\bf z}$), hence the cross product gives a vector which satisfies the condition for ${\bf u}$.

The NRICH Project aims to enrich the mathematical experiences of all learners. To support this aim, members of the
NRICH team work in a wide range of capacities, including providing professional development for teachers wishing to
embed rich mathematical tasks into everyday classroom practice. More information on many of our other activities
can be found here.