How to find the distance between $z$ axis and a line? Given the line $(3t, 1-t, 2-2t)$  I need to find the distance between the line and $z$ axis. First, we need to determine the mutual position of the lines. 
I'm not sure if it's correct to say that the vector form form for the line of $z$ axis is $z: (0,0,0)+s(0,0,1)$? Then the parametric form would be $(0,0,s)$. Then:
$$
\begin{cases} 
3t=0 \\
1-t=0\\
2-2t=s
\end{cases}
$$
From which we can see that the lines are not parallel, they don't intersect so they're perpendicular. If they are then we can build a plane that is spanned by the direction vectors and then calculate the distance. 
But my main concern is whether I correctly determine the mutual position.
 A: let $M=(3t,1-t,2-2t) $ be a point of the line.
its distance to $z-$axis is
$$\sqrt {9t^2+(1-t)^2} =$$
$$\sqrt {10t^2-2t+1} $$
the derivative inside is
$$20t-2$$
the minimum is attained for $t=\frac {1}{10} $ which gives the distance $\frac {3}{\sqrt {10}} $.
A: We can flatten the line along the $z$-direction so that it becomes the line $l$ defined by $(x,y)=(3t,1-t)$ in $\Bbb R^2$. We're looking for the point $P$ at which $l$ is closest to the origin $O$.
The line $l'$ through $OP$ will be perpendicular to $l$. Since $l$ has slope $-\frac13$, the slope of $l'$ is $3$. In other words, $l'$ is the line $y = 3x$.
Finally, combining the equations for both lines to find $P$, we have $1-t = 3(3t)$, so $t = \frac1{10}$. Now substitute this value in the original parametrization in $\Bbb R^3$.
A: The minimum distance between two lines is achieved at a pair of points such that the line through them is perpendicular to both lines.  
Using the given parameterization of the line, the plane perpendicular to the line through the point $P=(3t,1-t,2-2t)$ is given by the equation $$(3,-1,-2)\cdot(x-3t,y+t-1,z+2t-2)=3x-y-2z-14t+5=0$$ and this plane intersects the $z$-axis at $z=\frac12(5-14t)$. By construction, the line through this point and $P$ is always perpendicular to the line given in the problem, so we only need to check for perpendicularity to the $z$-axis: $$(0,0,1)\cdot(3t,1-t,2-2t-\frac12(5-14t))=5t-\frac12=0$$ therefore $t=\frac1{10}$ and $P(t)=\left(\frac3{10},\frac9{10},\frac95\right)$. Finally, the distance of this point from the $z$-axis is $\left(\left(\frac3{10}\right)^2+\left(\frac9{10}\right)^2\right)^{\frac12}=\frac3{\sqrt{10}}$.
