# Maths revision: Vector equation of a line and the intersection of two lines

It’s everybody’s favourite: AS and A level maths revision of vectors, YAY! Here we’re looking at the vector equation of a line, converting between vector form and cartesian form and the intersection of two lines.

The vector equation of a line consists of two vectors – a position vector, a vector from the origin to any point on the line – and a direction vector – which describes the gradient of the line. The vector equation of a line is given by:

$\fs6 r = (\begin{matrix}a\\b\end{matrix}) + \lam(\begin{matrix}y\\z\end{matrix})$

Where $(\begin{matrix}a\\b\end{matrix})$ is the position vector, $(\begin{matrix}y\\z\end{matrix})$ is the direction vector and $\lam$ is a parameter which can take any value. Each point on the line has a different value of $\lam$

Due to the nature of the vector equation of the line, the same line can have multiple equations. The position vector can be the position vector of any point on the line. The direction vector too can be written in many different ways. For example $(\begin{matrix}2\\4\end{matrix})$ means the line goes 4 units up for every 2 across. This is the same as $(\begin{matrix}1\\2\end{matrix})$ or even $(\begin{matrix}4\\8\end{matrix})$

#### General vector form of the equation of a line

In general, the vector form of the equation of the line joining two points, A and B, with position vectors a and b is given by:

$\fs6 r = a + \lam(b - a)$

### Converting to the cartesian form of a line

You may want to (actually, you probably won’t, but the examiner might want you to!) convert from the vector equation of a line to the cartesian form – involving x and y values. To do this firstly write r as $(\begin{matrix}x\\y\end{matrix})$, for example:

$\fs6 r = (\begin{matrix}x\\y\end{matrix}) = (\begin{matrix}1\\2\end{matrix}) + \lam(\begin{matrix}2\\4\end{matrix})$

This enables you to see equations for x and for y:

$\fs5 x = 1 + \lam2$
$\fs5 y = 2 + \lam4$

From here, rearrange both to make $\lam$ the subject:

$\fs5 \frac{x - 1}{2} =\lam$
$\fs5 \frac{y - 2}{4} =\lam$

You can now eliminate $\lam$ by equating the two expressions:

$\fs6 \frac{x - 1}{2} = \frac{y - 2}{4}$

This is the correct answer, however you may wish to tidy it up to make it look nicer! If you’re asked to simplify then make sure you do for those extra marks.

#### General form (2 and 3 dimensions)

In general the vector form of an equation:

$\fs6 r = (\begin{matrix}x\\y\end{matrix}) = (\begin{matrix}a_1\\a_2\end{matrix}) + \lam(\begin{matrix}u_1\\u_2\end{matrix})$

Can be written in cartesian form as:

$\fs6 \frac{x - a_1}{u_1} = \frac{y - a_2}{u_2}$

For 3 dimensions:

$\fs6 r = \left(\begin{matrix}x\\y\\z\end{matrix}\right) = \left(\begin{matrix}a_1\\a_2\\a_3\end{matrix}\right) + \lam\left(\begin{matrix}u_1\\u_2\\u_3\end{matrix}\right)$

Can be written in cartesian form as:

$\fs6 \frac{x - a_1}{u_1} = \frac{y - a_2}{u_2} = \frac{z - a_3}{u_3}$

### Converting from cartesian form to vector form

But what if the examiner is an awkward sod and wants you to convert the other way around? To convert from cartesian form to vector form you first want to find a position vector, to do this find any point on the line, the easiest way is to substitute x = 0 into the equation and find a value for y. You then need to calculate then convert the gradient of the line into vector form to give you your direction vector.

#### Example

Example question: Write y = 2x + 3 in vector form

Worked solution: Firstly find a point on the line, in this case substituting x = 0 gives y = 3, this point (0, 3) has the position vector $(\begin{matrix}0\\3\end{matrix})$ and gives the first part of the vector form of the equation. The gradient in this example is 2 as the equation is in the form y = mx + c. This needs to be converted into vector form, a gradient of 2 means the line goes up 2 units for every 1 across, thus the direction vector is $(\begin{matrix}1\\2\end{matrix})$. Hence the final equation is:

$\fs6 r = (\begin{matrix}0\\3\end{matrix}) + \lam(\begin{matrix}1\\2\end{matrix})$

### Intersection of two lines

Finding the points of intersection of two lines in vector form is similar to that involving lines in cartesian form. For example, take these two lines in vector form

$\fs6 r = (\begin{matrix}2\\1\end{matrix}) + \lam(\begin{matrix}1\\0\end{matrix})$

$\fs6 r = (\begin{matrix}3\\0\end{matrix}) + \mu(\begin{matrix}1\\1\end{matrix})$

$\mu$ is just a parameter like $\lam$.

Start by equating the two equations together:

$\fs6 (\begin{matrix}2\\1\end{matrix}) + \lam(\begin{matrix}1\\0\end{matrix}) = (\begin{matrix}3\\0\end{matrix}) + \mu(\begin{matrix}1\\1\end{matrix})$

You can now create two equations involving $\lam$ and $\mu$

$\fs6 2 + 1\lam = 3 + 1\mu \shortrightarrow 2 + \lam = 3 + \mu$

$\fs6 1 + 0\lam = 0 + 1\mu \shortrightarrow 1 = \mu$

You now have to two simultaneous equations (lucky you!) which can be solved to give value(s) of $\mu$ and $\lam$ which satisfy both equations.

This is example is pretty easy as the second equation gives us the value of $\mu$ right away. Substituting this into the top equation gives $\lam = 3$. You’re not finished yet though, to find the position vector of the this point you need to substitute either $\mu = 1$ or $\lam = 2$ into the original equations.

$\fs6 (\begin{matrix}2\\1\end{matrix}) + 2(\begin{matrix}1\\0\end{matrix}) = (\begin{matrix}4\\1\end{matrix})$

OR

$\fs6 (\begin{matrix}3\\0\end{matrix}) + 1(\begin{matrix}1\\1\end{matrix}) = (\begin{matrix}4\\1\end{matrix})$

Hence the position vector of the point of intersection is $(\begin{matrix}4\\1\end{matrix})$

If you have the time, substitute it into both equations to make sure you get the same answer: If you don’t, you’ve gone wrong!