Unit sphere parametrization 
Consider the unit sphere $S^2 = \{(x,y,z): x^2+y^2+z^2 = 1\}.$
a. Given any point $(x,y,0)$ in the $xy$-plane, parameterized the line
  that contains $(x,y,0)$ and $(0,0,1)$.
b. Show this line intersects $S^2$ in exactly two points $(0,0,1)$ and
  another point.

How can I do this problem? 
 A: The line between two points $(x_0,y_0,z_0)$ and  $(x_1,y_1,z_1)$ can be written as follows:
$$
\frac{X-x_0}{x_1-x_0}=\frac{Y-y_0}{y_1-y_0}=\frac{Z-z_0}{z_1-z_0}
$$
Therefore all three fractions should be equal, let's say $t$. This can be used to parametrize the line with $t$. We get:
$$
{X}=x_0+t({x_1-x_0})\\
Y=y_0+t({y_1-y_0})\\
{Z=z_0}+t({z_1-z_0})
$$
Therefore for two points $(0,0,1)$ and $(x,y,0)$ we get the following line:
$$
\frac{X}{x}=\frac{Y}{y}=\frac{Z-1}{-1}=t
$$
Therefore the paramterization of the line is $(tx,ty,1-t)$. To obtain the points on the line and on the sphere,  $(tx,ty,1-t)$ should satisfy the equation of sphere. Putting this into the equation of sphere, we get:
$$
t^2(x^2+y^2)+(1-t)^2=1\implies t=0 \quad or \quad t=\frac{2}{x^2+y^2+1} 
$$
which gives us two points:
$$
(0,0,1) \quad (\frac{2x}{x^2+y^2+1},\frac{2y}{x^2+y^2+1},1-\frac{2}{x^2+y^2+1})
$$
A: The easiest way to parametrize a line through two points is 
$$(1-t)\mbox{[first point]}+\mbox{t[second point]}.$$  (If you want the line segment from the first point to the second point, you let $t$ go from $0$ to $1$).  I think this is a useful trick that is worth remembering.  You can use it to parametrize a directed line segment from one pont to another.  When you do this you'll get $\langle tx, ty, (1-t)\rangle$.  I let $(x,y,0)$ be the "second point" so it would work out nicer.  Now square the components of $\langle tx, ty, (1-t)\rangle$, and set the result equal to $1$.  You'll get a quadratic equation in $t$.  One solution will be $0$ because the line goes through $(0,0,1)$.  So you'll divide the quadratic equation by $t$, and you'll get a linear equation in $t$ which you can solve for $t$.  Take that value of $t$ and substitute it into $(tx, ty, (1-t))$.
