Skip to main content
Mathematics LibreTexts

1.3: Equations of Lines in 2d

  • Page ID
    89205
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    A line in two dimensions can be specified by giving one point \((x_0,y_0)\) on the line and one vector \(\textbf{d}=\left \langle  d_x,d_y \right \rangle \) whose direction is parallel to the line.

    twodLine.svg

    If \((x,y)\) is any point on the line then the vector \(\left \langle  x-x_0,y-y_0 \right \rangle \text{,}\) whose tail is at \((x_0,y_0)\) and whose head is at \((x,y)\text{,}\) must be parallel to \(\textbf{d}\) and hence must be a scalar multiple of \(\textbf{d}\text{.}\) So

    Equation 1.3.1. Parametric Equations

    \[\begin{gather*} \left \langle  x-x_0,y-y_0 \right \rangle =t \textbf{d} \end{gather*}\]

    or, writing out in components,

    \[\begin{align*} x-x_0&=t d_x\\ y-y_0&=t d_y \end{align*}\]

    These are called the parametric equations of the line, because they contain a free parameter, namely \(t\text{.}\) As \(t\) varies from \(-\infty\) to \(\infty\text{,}\) the point \((x_0+td_x,y_0+td_y)\) traverses the entire line.

    It is easy to eliminate the parameter \(t\) from the equations. Just multiply \(x-x_0=t d_x\) by \(d_y\text{,}\) multiply \(y-y_0=t d_y\) by \(d_x\) and subtract to give

    \[\begin{gather*} (x-x_0)d_y-(y-y_0)d_x=0 \end{gather*}\]

    In the event that \(d_x\) and \(d_y\) are both nonzero, we can rewrite this as

    Equation 1.3.2. Symmetric Equation

    \[\begin{gather*} \frac{x-x_0}{d_x}=\frac{y-y_0}{d_y} \end{gather*}\]

    This is called the symmetric equation for the line.

    A second way to specify a line in two dimensions is to give one point \((x_0,y_0)\) on the line and one vector \(\textbf{n}=\left \langle  n_x,n_y \right \rangle \) whose direction is perpendicular to that of the line.

    twodLineNormal.svg

    If \((x,y)\) is any point on the line then the vector \(\left \langle  x-x_0,y-y_0 \right \rangle \text{,}\) whose tail is at \((x_0,y_0)\) and whose head is at \((x,y)\text{,}\) must be perpendicular to \(\textbf{n}\) so that

    Equation 1.3.3

    \[\begin{gather*} \textbf{n}\cdot\left \langle  x-x_0,y-y_0 \right \rangle =0 \end{gather*}\]

    Writing out in components

    \[\begin{gather*} n_x(x-x_0)+n_y(y-y_0)=0\qquad\text{or}\qquad n_xx+n_yy= n_xx_0+n_yy_0 \end{gather*}\]

    Observe that the coefficients \(n_x,n_y\) of \(x\) and \(y\) in the equation of the line are the components of a vector \(\left \langle  n_x,n_y \right \rangle \) perpendicular to the line. This enables us to read off a vector perpendicular to any given line directly from the equation of the line. Such a vector is called a normal vector for the line.

    Example 1.3.4

    Consider, for example, the line \(y=3x+7\text{.}\) To rewrite this equation in the form

    \[ n_xx+n_yy= n_xx_0+n_yy_0 \nonumber \]

    we have to move terms around so that \(x\) and \(y\) are on one side of the equation and \(7\) is on the other side: \(3x-y=-7\text{.}\) Then \(n_x\) is the coefficient of \(x\text{,}\) namely \(3\text{,}\) and \(n_y\) is the coefficient of \(y\text{,}\) namely \(-1\text{.}\) One normal vector for \(y=3x+7\) is \(\left \langle  3,-1 \right \rangle \text{.}\)

    Of course, if \(\left \langle  3,-1 \right \rangle \) is perpendicular to \(y=3x+7\text{,}\) so is \(-5\left \langle  3,-1 \right \rangle =\left \langle  -15,5 \right \rangle \text{.}\) In fact, if we first multiply the equation \(3x-y=-7\) by \(-5\) to get \(-15x+5y=35\) and then set \(n_x\) and \(n_y\) to the coefficients of \(x\) and \(y\) respectively, we get \(\textbf{n}=\left \langle  -15,5 \right \rangle \text{.}\)

    Example 1.3.5

    In this example, we find the point on the line \(y=6-3x\) (call the line \(L\)) that is closest to the point \((7,5)\text{.}\)

    We'll start by sketching the line. To do so, we guess two points on \(L\) and then draw the line that passes through the two points.

    • If \((x,y)\) is on \(L\) and \(x=0\text{,}\) then \(y=6\text{.}\) So \((0,6)\) is on \(L\text{.}\)
    • If \((x,y)\) is on \(L\) and \(y=0\text{,}\) then \(x=2\text{.}\) So \((2,0)\) is on \(L\text{.}\)

    closestA.svg            closestB.svg

    Denote by \(P\) the point on \(L\) that is closest to \((7,5)\text{.}\) It is characterized by the property that the line from \((7,5)\) to \(P\) is perpendicular to \(L\text{.}\) This is the case just because if \(Q\) is any other point on \(L\text{,}\) then, by Pythagoras, the distance from \((7,5)\) to \(Q\) is larger than the distance from \((7,5)\) to \(P\text{.}\) See the figure on the right above.

    Let's use \(N\) to denote the line which passes through \((7,5)\) and which is perpendicular to \(L\text{.}\)

    closest.svg

    Since \(L\) has the equation \(3x+y=6\text{,}\) one vector perpendicular to \(L\text{,}\) and hence parallel to \(N\text{,}\) is \(\left \langle  3,1 \right \rangle \text{.}\) So if \((x,y)\) is any point on \(N\text{,}\) the vector \(\left \langle  x-7,y-5 \right \rangle \) must be of the form \(t\left \langle  3,1 \right \rangle \text{.}\) So the parametric equations of \(N\) are

    \[\begin{gather*} \left \langle  x-7,y-5 \right \rangle =t\left \langle  3,1 \right \rangle \qquad\text{or}\qquad x=7+3t,\ y=5+t \end{gather*}\]

    Now let \((x,y)\) be the coordinates of \(P\text{.}\) Since \(P\) is on \(N\text{,}\) we have \(x=7+3t\text{,}\) \(y=5+t\) for some \(t\text{.}\) Since \(P\) is also on \(L\text{,}\) we also have \(3x+y=6\text{.}\) So

    \[\begin{alignat*}{2} & & 3(7+3t)+(5+t)&= 6\\ & \iff\qquad& 10t+26&= 6\\ & \iff\qquad& t&=-2\\ & \implies\qquad& x&= 7+3\times (-2)=1,\ y=5+(-2)=3 \end{alignat*}\]

    and \(P\) is \((1,3)\text{.}\)

    Exercises

    Stage 1

    1

    A line in \(\mathbb R^2\) has direction \(\mathbf d\) and passes through point \(\mathbf c\text{.}\)

    Which of the following gives its parametric equation: \(\left \langle x,y \right \rangle =\mathbf c + t\mathbf d \text{,}\) or \(\left \langle  x,y \right \rangle =\mathbf c - t\mathbf d \text{?}\)

    2

    A line in \(\mathbb R^2\) has direction \(\mathbf d\) and passes through point \(\mathbf c\text{.}\)

    Which of the following gives its parametric equation: \(\left \langle  x,y \right \rangle =\mathbf c + t\mathbf d \text{,}\) or \(\left \langle  x,y \right \rangle =-\mathbf c +t \mathbf d\text{?}\)

    3

    Two points determine a line. Verify that the equations

    \[ \left \langle  x-1,y-9 \right \rangle=t\left \langle  8,4 \right \rangle \nonumber \]

    and

    \[ \left \langle  x-9,y-13 \right \rangle=t\left \langle  1,\tfrac12 \right \rangle \nonumber \]

    describe the same line by finding two different points that lie on both lines.

    4

    A line in \(\mathbb R^2\) has parametric equations

    \[ \begin{array}{lcl} x-3&=&9t\\ y-5&=&7t \end{array} \nonumber \]

    There are many different ways to write the parametric equations of this line. If we rewrite the equations as

    \[ \begin{array}{lcl} x-x_0&=&d_xt\\ y-y_0&=&d_yt \end{array} \nonumber \]

    what are all possible values of \(\left \langle  x_0,y_0 \right \rangle\) and \(\left \langle  d_x,d_y \right \rangle\text{?}\)

    Stage 2

    5

    Find the vector parametric, scalar parametric and symmetric equations for the line containing the given point and with the given direction.

    1. point \((1,2)\text{,}\) direction \(\left \langle  3,2 \right \rangle \)
    2. point \((5,4)\text{,}\) direction \(\left \langle  2,-1 \right \rangle \)
    3. point \((-1,3)\text{,}\) direction \(\left \langle  -1,2 \right \rangle \)
    6

    Find the vector parametric, scalar parametric and symmetric equations for the line containing the given point and with the given normal.

    1. point \((1,2)\text{,}\) normal \(\left \langle  3,2 \right \rangle \)
    2. point \((5,4)\text{,}\) normal \(\left \langle  2,-1 \right \rangle \)
    3. point \((-1,3)\text{,}\) normal \(\left \langle  -1,2 \right \rangle \)
    7

    Use a projection to find the distance from the point \((-2,3)\) to the line \(3x-4y=-4\text{.}\)

    8

    Let \(\textbf{a} \text{,}\) \(\textbf{b} \) and \(\textbf{c} \) be the vertices of a triangle. By definition, a median of a triangle is a straight line that passes through a vertex of the triangle and through the midpoint of the opposite side.

    1. Find the parametric equations of the three medians.
    2. Do the three medians meet at a common point? If so, which point?
    9

    Let \(C\) be the circle of radius 1 centred at \((2,1)\text{.}\) Find an equation for the line tangent to \(C\) at the point \(\left(\frac{5}{2},1+\frac{\sqrt3}{2}\right)\text{.}\)


    This page titled 1.3: Equations of Lines in 2d is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Joel Feldman, Andrew Rechnitzer and Elyse Yeager via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.

    • Was this article helpful?