# calculate the equations for lines tangent to a sphere

Just started self-studying linear algebra, and as such I have no teacher I can ask. Working my way through first-year university material for linear algebra from a dutch university, so I might use the wrong english terms here. If so, please tell me the right english terms :) I am stuck in part 4 of this multi-part exercise. Up till now when I was stuck I would find the solution after a few days (spending pages and pages of notes :) ) But this time no... Just so there is no confusion, and also because I think the first three parts are partially a hint to the fourth and last part, I replicate the whole exercise here.

Sphere B with center (3,2,1) and radius 3.

1. Show that P = (1,0,2) is a point on the sphere.
2. Find the cartesian equation of the plane tangent to the sphere through P.
3. Show that line $l$ given by $x = (0,3,0) + \lambda(-3,2,4)$ has no point of intersection with B.
4. Find the cartesian equations of each plane through $l$ and tangent to the sphere.

What I have now (abbreviated):

1) equation for B is $|x - (3,2,1)| \leq 3$, for x = (1,0,2) we get $|(-2,-2,1)| \leq 3 \Rightarrow \sqrt{4+4+1} \leq 3$. So P is on the surface of the sphere.

2) vector from P to the center of B is $\overrightarrow{P} - (3,2,1) = (-2,-2,1)$, which is the normal vector of the plane we want. So the plane is $-2x_1 - 2x_2 + x_3 = a$. We find $a$ by filling in the values for P: -2*1 - 2*0 + 2 = 0. (answer section of the booklet gives $-2x_1 -2x_2 +x_3 = 1$ but I am convinced that is wrong... hope you people agree)

3) say the center of B is P, the point on $l$ that intersects with the line perpedicular to $l$ through P is Q. Q is on $l$ so the vector to Q is $\pmatrix{-3\lambda\\3 + 2\lambda\\4\lambda}$ for a certain value of $\lambda$. Vector $\overrightarrow{PQ}$ is Q - P is $\pmatrix{-3\lambda - 3\\2\lambda + 1\\4\lambda -1}$. Perpedicular to $l$ so the dot product of $\overrightarrow{PQ}$ and (-3, 2, 4) is zero. Working that out gives $\lambda = \frac{-7}{29}$. So Q is $\pmatrix{^{21}/_{29}\\ ^{73}/_{29}\\ ^{-28}/_{29}}$. The length of $\overrightarrow{PQ}$ is $\sqrt{(^{66}/_{29})^2 + (^{15}/_{29})^2+(^{-57}/_{29})^2}$ which is larger than 3.

4) What I could think of: if I can find the lines through Q, tangent to B, perpendicular to $l$, the equation for each tangent plane can be calculated from the vector representation of $l$ by adding an extra direction vector, the direction vector from each tangent line. I call the direction vector $m$ here. The vector equation for the tangent lines is (with each a different $m$) $x = \overrightarrow{Q} + \lambda m$

These tangent lines (I believe there are two) go through a point on sphere B. That point thus adheres to | x - (3,2,1) | = 3. That intersection point is on the tangent line, so $$\left|\pmatrix{^{21}/_{29}\\^{73}/_{29}\\^{-28}/_{29}} + \lambda \pmatrix{m_1\\m_2\\m_3} - \pmatrix{3\\2\\1} \right| =3 \Rightarrow \left|\pmatrix{^{-66}/_{29}\\^{15}/_{29}\\^{-57}/_{29}} + \lambda \pmatrix{m_1\\m_2\\m_3} \right| =3$$ $$\Rightarrow \sqrt{ (^{-66}/_{29} + \lambda m_1)^2 + (^{15}/_{29} + \lambda m_2)^2 + (^{-57}/_{29} + \lambda m_3)^2 } = 3$$

The lines are perpendicular to $l$, so the dot-product of $m$ and the direction vector of $l$ is zero. That gives $-3m_1 + 2m_2 + 4m_3 =0 \Rightarrow m_1= \frac{2m_2 + 4m_3}{3}$.

I can then substitute $m_1$ in the equation of the last paragraph, but that leaves me with three unknowns: $\lambda$, $m_2$ and $m_3$. I thought I could assume $\lambda$ to be 1 in the intersection point on B, as any change in $\lambda$ will only make me find some scalar multiple of $m$. (and $\lambda$ is zero in Q already)

Still that ends up with an equation far more complicated than in any previous exercise, and with that fraction with the very impractical denominator 29 I suspect I am both following the wrong approach, and I can have made some calculation error.

The booklet gives me the answer ( $4x_1 +3x_3 =0$ and $2x_1 −x_2 +2x_3 =−3$ ) but I cannot find a clue in that. Only that probably there should not be such a complicated fraction in my calculations :)

I found Where's the error in my calculation of a line through a point and being the tangent to a circle? and Sphere tangent to a plane but they did not help me getting closer.

I presume I have lost a lot of credit because of this huge wall of text... if that put you off I can understand! My apologies, I tried to make it as short as I could while still providing all my thinking. Thanks for any answers!

• It appears to me that you have correctly answered (1), and your analysis of (2) also seems correct. Your answer to (3) looks good as well. I started to suggest that you consider a line parallel to $l$ through the center of $B$ for (4), but that may not be the best approach. – abiessu Sep 18 '13 at 16:39
• @abiessu Thanks for working through that whole thing! I was really hoping there would be some mistake in calculating Q in (3) (so that I would end up with some simple convenient values instead of the fractions) but I had already checked it a zillion times. Your proposal for (4) made me thinking but I would not now how to use that line parallel to l... – ChrisD Sep 18 '13 at 16:48

Make a drawing of the sphere and the line $l$ and notice that one of the tangent planes must pass quite close to the origin. It makes sense to check if it might be the plane that goes through the origin exactly. This gives $4x+3z=0$ and it is easy to verify that this plane is at the right distance from the centre of the sphere, so it is a tangent plane. Then, the other tangent plane is obtained from the first by reflecting it in the plane that passes through the line $l$ and the centre of the sphere, which gives $2x-y+2z+3=0$.
So, making a drawing and a guess is the easiest way to solve this problem. Your way of solving it is fine, but there is a more straightforward way, which relies on Plücker coordinates. You want to find two plane that pass through $l$ and are at the right distance from the centre of the sphere. For a plane defined by $$ax+by+cz+d=0,\quad\textrm{where}\quad a^2+b^2+c^2=1,$$ these two conditions are satisfied if $$|3a+2b+c+d|=3$$ and $$\begin{pmatrix} 0&p_{23}&p_{31}&p_{12}\\ -p_{23}&0&p_{03}&-p_{02}\\ -p_{31}&-p_{03}&0&p_{01}\\ -p_{12}&p_{02}&-p_{01}&0 \end{pmatrix} \begin{pmatrix}d\\a\\b\\c \end{pmatrix}=0,$$
where $(p_{01}, p_{02}, p_{03},p_{23},p_{31},p_{12})$ are the Plücker coordinates of $l$. For your problem, this gives the following equations: $$3a-2b-4c=0, \\-3d-9b=0, \\2d+9a-12c=0,\\ 4d+12b=0,\\ |3a+2b+c+d|=3,\\ a^2+b^2+c^2=1,$$ which can be solved easily in mathematica.