### Intersection line of two planes

Two planes intersect by a straight line (we assume that $\vec{a}_1$ and $\vec{a}_2$ are not parallel). First let us write the equation of a straight line which passes through the point $\vec{r}_0$ in the direction given by the vector $\vec{l}$. Since for each point $\vec{r}$ on this straight line the vector $(\vec{r}-\vec{r}_0)\parallel \vec{l}$ we have
$(\vec{r}-\vec{r}_0)\times \vec{l}=0$
This is the vector equation for a straight line. Now, our line has to be perpendicular to $\vec{a}_1$ and $\vec{a}_2$, thus we may choose $\vec{l}=\vec{a}_1\times\vec{a}_2$. The point $\vec{r}_0$ belongs two the both planes simultaneously, that is, $\vec{r}_0\cdot\vec{a}_1=d_1$ and $\vec{r}_0\cdot\vec{a}_2=d_2$. Let us try to find is as $\vec{r}_0=k_1\vec{a}_1+k_2\vec{a}_2$. The conditions give
$k_1\vec{a}_1^2+ k_2\vec{a}_1\cdot\vec{a}_2=d_1\\ k_1\vec{a}_1\cdot\vec{a}_2+ k_2\vec{a}_2^2=d_2$
This set of equations always has a unique solution since $\vec{a}_1^2\vec{a}_2^2> (\vec{a}_1\cdot\vec{a}_2)^2$.