Skip to main content
Mathematics LibreTexts

3.3 Lines and Circles

  • Page ID
    152976
  • \( \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}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)
    Learning Objectives

    By the end of this section, you will be able to:

    • give and use the point-slope and slope-intercept forms for the equation of a line
    • find the intercepts and slope of a line
    • connect the idea of slope to parallel and perpendicular lines
    • find where two lines intersect
    • sketch the graph of a line
    • know and use the essential geometric formulas for circles
    • recognize the standard equation of a circle and what it tells you
    • sketch the graph of a circle

    In this section, we're going to find out how to describe straight lines and circles using equations. We first need a place for our lines to live. For this, we use a coordinate plane.

    coordinate plane.png

    You might hear this called the Cartesian plane, too. Anyway, it's a two-dimensional plane defined by two perpendicular axes, the (horizontal) \(x\)-axis and the (vertical) \(y\)-axis. Points on the plane are defined by a coordinate pair of numbers, \((x, y)\), where the first coordinate is always the \(x\)-value and the second coordinate is always the \(y\)-value. (In the olden days these coordinates were called the abscissa and the ordinate, but now if you say that people will be like "Oh yeah, weren't those the two monsters they had to sail between in the Odyssey?" No. But I digress.) You can see I've labeled a few points as examples. If you look at the point \( (2,3)\) and track down toward the \(x\)-axis, you'll see his \(x\)-value is 2. Track horizontally from the point over to the \(y\)-axis, and you'll see his \(y\)-value is 3. Check the same for \( (-1,1)\). You can now take any point on the plane and determine its coordinates "address," and if I gave you a set of coordinates, you could locate that point on the plane. The point \( (0,0)\) is the location where the axes intersect, and it's called the origin.

    Exercise \(\PageIndex{1}\)

    What are the \(x\)- and \(y\)-coordinates of that point I labeled \( (x,y)\) up there?

    Answer

    \(3, 1\)

    Lines

    Now, here's a picture of a straight line graphed (drawn) in the coordinate plane. Take a gander and then we'll discuss.

    line.png

    This line is straight as heck, we agree. I labeled the line with an equation, which we'll get to momentarily. For now, look at the points I deigned to label. The \( (-2,0)\) is sitting on the \(x\)-axis, so it's called an \(x\)-intercept. Likewise, the point \( (0,1)\) is sitting on the \(y\)-axis, so it's called a \(y\)-intercept. This line also has a quality of steepness, which we need to describe somehow. Notice that if I travel from the point \( (0,1)\) to the point \( (2,2) \), I need to go a distance of 2 units to the right horizontally, as well as 1 unit up vertically. We say this is 2 units in the positive \(x\) direction and 1 unit in the positive \(y\) direction. Horizontal travel is nicknamed run, while vertical travel is nicknamed rise. Steepness essentially describes how much altitude you gain while traveling a certain amount of horizontal distance. For every two steps to the right, my line goes up one step. We call this ratio the slope of the line, and usually denote it \(m\). How do we calculate it?

    The run of 2 can be computed as the difference of the \(x\)-coordinates of the two points \( (0,1) \) and \( (2,2)\). Similarly, the rise is computed as the difference of the \(y\)-coordinates. So in this case,

    \[ m = \dfrac{ \text{rise}}{\text{run}} = \dfrac{ \text{change in } y}{\text{change in } x} = \dfrac{ 2-1}{2-0} = \dfrac{1}{2} \notag \]

    • An \(x\)-intercept is a point where the line crosses the \(x\)-axis, and it will always have a \(y\)-coordinate of 0.
    • A \(y\)-intercept is a point where the line cross the \(y\)-axis, and it will always have an \(x\)-coordinate of 0.
    • The slope \(m\) of a line can be calculated using two distinct points on the line, \( (x_1,y_1)\) and \( (x_2,y_2)\), by computing rise over run:

    \[ m = \dfrac{ \text{rise}}{\text{run}} = \dfrac{ \text{change in } y}{\text{change in } x} = \dfrac{y_2 - y_1}{x_2-x_1} \notag \]

    When calculating slope, it doesn't matter which order you subtract the coordinates in, as long as you are consistent on top and bottom! Also, the result will be the same for any two points you choose on the line. If we computed the slope using the points \( (-2,0)\) and \( (0,1)\) instead, we would get the same thing! In other words, a straight line has constant slope, that is, it never changes steepness.

    Before we talk about equations, I want to give you a few more general ideas about slope. Compare this picture to the block of important info that comes right after it:

    slopes neg pos.png

    • Uphill / Increasing lines have positive slopes. Lines with whole number slopes bigger than 1 look steeper and lines with little fraction slopes smaller than 1 look less steep. The general idea is the bigger the number, the steeper the line.
    • Downhill / Decreasing lines have negative slopes. Again, whole numbers more negative than \( -1\) make steeper lines and little fractional slopes like \(-\frac{1}{2} \) make less steep lines.
    • Fun fact: if the slope of a line is zero, it's actually a flat horizontal line. The rise must be zero for this to happen, so the line can't go uphill or downhill.
    • The slope of a vertical line is undefined, because if you're vertical, you are not changing horizontally at all, so the run would be zero and we can't divide by zero!

    Okay, let's get to equations. Here's the bottom line (no pun intended, but I'm not taking it out).

    All of the points \(( x,y)\) lying on a straight line will satisfy a certain equation of the form \(y = mx + b\).

    Look back at this picture:

    line.png

    The equation that goes with this line is \(y = \frac{1}{2}x + 1 \). Take the point on the line \( (0,1)\) and plug in \(0\) for \(x\) and \(1\) for \(y\):

    \[ y = \frac{1}{2}x + 1 \quad \longrightarrow \quad \textcolor{red}{1} \overset{?}{=} \frac{1}{2}(\textcolor{red}{0}) + 1 \notag \]

    Yep, \(1 = 0+1\) any day. Plug in the \(x\)- and \(y\)-values of any other point on that line, and the equation will still be true. Now, there are some very special features of this equation form.

    Slope-Intercept Equation of a Line

    The equation of a line with slope \(m\) and \(y\)-intercept \( (0,b)\) is
    \[ y = mx + b \notag \]

    If you look back at the example, you can see the \(y\)-intercept was \((0,1)\) and yes indeed, we see a \(1\) in the \(b\) position of his equation.

    Exercise \(\PageIndex{2}\)

    What is the slope-intercept equation of a line with slope \(m = -3\) and \(y\)-intercept \( (0,4)\)?

    Answer

    We identify that \(b = 4\) and plug in: \( y = -3x + 4\).

    Everybody loooooves good old em-ex-plus-bee, but the equation form you'll use most for the rest of your calculus life will be the point-slope form, so prioritize memorizing that. It needs two ingredients: a value \(m\) for the slope, and a point you want the line to go through, \( (x_0, y_0) \).

    Point-Slope Equation of a Line

    The equation of a line with slope \(m\) passing through the point \( (x_0,y_0)\) is

    \[ y - y_0 = m ( x - x_0 ) \notag \]

    Example \(\PageIndex{1}\)

    Use point-slope form to write the equation of a line with slope \( -2 \) that passed through the point \( (1,3)\). Then use algebra to simplify the equation to slope-intercept form.

    Solution

    We have \( m = -2\) and \( (x_0,y_0) = (1,3) \), so we just plug in: \( y - 3 = -2(x - 1) \). Now we simplify and isolate \( y\) until we match the form \(y = mx + b\).

    \[ y - 3 = -2(x - 1) \quad \longrightarrow \quad y = -2x + 2 + 3 \quad \longrightarrow \quad y = -2x + 5 \notag \]

    From this form, we can tell that the \(y\)-intercept of this line would be \( (0,5)\).

    Let's look at two interesting situations real quick. On the left, the lines go on forever without intersecting, which is called being parallel lines. On the right, they meet at right angles (90 degrees), which called being perpendicular lines.

    parallel perp.png

    • Parallel lines have the same slope.
    • If two lines are perpendicular to each other then their slopes are negative reciprocals. (The negative reciprocal of a number \( \frac{a}{b} \) is \(- \frac{b}{a} \).)
    Example \(\PageIndex{2}\)

    1. Find the equation of the line that is parallel to the line \(y = 2x - 5 \) and passes through the point \( (-1, 8) \).

    2. Find the equation of the line that is perpendicular to the line \(y = 2x - 5 \) and passes through the point \( (3, 2)\).

    Solution

    1. We have the ingredient \( (x_0,y_0) = (-1, 8) \), so we just need to find a slope to use. If we want to be parallel to \(y = 2x - 5\), we better have the same slope. Since that equation is in slope-intercept form, we can just read off that the slope is 2. So we plug in \(m = 2\) and the point we have to get \( y - 8 = 2 (x +1) \).

    2. This time we want to pass through \( (x_0,y_0) = (3, 2) \), and we want to be perpendicular to \(y = 2x - 5 \). We know that guy's slope is 2, which we can think of as \(\frac{2}{1}\). Then the negative reciprocal is \( - \frac{1}{2}\). We'll use that for \(m\) and plug in to get \( y - 2 = -\frac{1}{2}(x - 3) \).

    Exercise \(\PageIndex{3}\)

    Find the equation of a line that is:

    1. parallel to \( y + 2 = -3x \) and passes through \( (1,1)\).
    2. perpendicular to \( y + \frac{4}{5} x + 1 = 0 \) and passes through \( (10,0)\).

    Hint: You need to simplify the given equations until they are in the form \(y = mx + b\) so that you can see what their slopes are!

    Answer
    1. \( y-1 = -3(x-1)\)
    2. \( y = \frac{5}{4} (x - 10)\)

    If two lines aren't parallel, then they are guaranteed to intersect somewhere, eventually. At the location of intersection, they are at the exact same \(y\)-value for the exact same \(x\)-value. In slope-intercept form, \(y = mx + b\), we can see that \(y\) "depends" on \(x\). So in a sense, we could "hypothesize" that the \(y\)-values are equal, and solve for the \(x\)-value that would make that true.

    To find where two lines \(y = m_1 x + b_1 \) and \(y = m_2 x + b_2\) intersect, set \(m_1 x + b_1 = m_2 x + b_2 \) and solve for \(x\). Then to find the corresponding \(y\)-coordinate, plug that \(x\) solution into either of the original equations.

    Sometimes, after simplification, you will find the two equations are equivalent, in which case the lines are not actually distinct. They have ALL points in common.

    Example \(\PageIndex{3}\)

    If the two lines intersect, find the point of intersection.

    1. \( y + 2x = -1\) and \(y = -2x + 4\)
    2. \( y + 2 = x \) and \( 2y = 6x + 8\)
    Solution

    1. The second line is already in slope-intercept form, but the other one needs rearranging to get \(y = -2x - 1\). We see at a glance that their slopes are the same! These are parallel lines and will never intersect. If you didn't notice this and set them equal anyway, you would be trying to solve

    \[ -2x -1 \overset{?}{=} -2x + 4 \quad \longrightarrow \quad -2x -1 + 2x \overset{?}{=} -2x + 4 + 2x \quad \longrightarrow \quad -1 \overset{?}{=} 4 \notag \]

    and that is what we in the biz call a dirty rotten lie.

    2. Both of these need a little cleaning to be in slope-intercept form, so do the algebra and report back. Did you get \(y = x-2\) and \(y = 3x + 4 \)? Me too. Now set the right hand sides equal to each other and solve for \(x\):

    \[ x-2 = 3x + 4 \quad \longrightarrow \quad 2x = -6 \quad \longrightarrow \quad x = -3 \notag \]

    This means the lines are at the exact same point when \(x = -3\). To find the \(y\)-coordinate, we plug in to one of the equations:

    \[ y = (-3) - 2 \quad \longrightarrow \quad y = -5 \notag \]

    The point of intersection is \( (-3,-5) \).

    Let's end this part with some tips for drawing lines quickly and easily based on their equations.

    • If you know one point and the slope \(m = \frac{a}{b}\) is positive, plot the point and then find another point just by tracking \(b\) units to the right, and then \(a\) units up. Drop a point in right there, connect them with a straight line, and you're done.
    • If the slope \(m = -\frac{a}{b}\) is negative, then track \(b\) units to the right, and then \(a\) units down instead.
    • If a slope-intercept form has no \(b\) term, like this \(y = 3x\), that means \(b\) is secretly \(0\). Thus you automatically know that line passes through the origin since its \(y\)-intercept is \( (0,0)\).
    • An equation \(y = b\) with no \(x\) term actually means \(y = 0x + b\), so slope is zero and the line is horizontal, passing through \(b\) on the \(y)-axis.
    • An equation \(x = a\) with no \(y\) term is a vertical line with undefined slope, passing through \(a\) on the \(x\)-axis.
    Exercise \(\PageIndex{4}\)

    Sketch the graph of the line \( y = \frac{3}{2}x + 1 \)

    Answer

    The slope-intercept form tells me the \(y\)-intercept \( (0,1)\) so I plot that. Then I count over 2 steps to the right and count up 3 steps, and drop another point in right there. Then I connect the dots like it's kindergarten!

    graphing line.png

    Circles

    Here are some circles drawn on coordinate planes. Each one is labeled with an equation. All of the points lying on the circle satisfy the equation given.

    circles.png

    What do you deduce about the relationship between the equation and how the circle looks? The radius of the circle (the uniform distance from the center to any point on the circle) seems to be the number getting squared on the right hand side. And the coordinates of the center? They seem to be the numbers subtracted inside the parentheses. Interesting...

    Standard Equation of a Circle

    The equation of a circle centered at the point \( (h,k) \) with radius \(r\) is

    \[ (x-h)^2 + (y-k)^2 = r^2 \notag \]

    Exercise \(\PageIndex{5}\)
    1. Describe the circle whose equation is \( (x+2)^2 + (y -1)^2 = 16 \).
    2. Find the equation of a circle centered at \( (1,2) \) with radius \(5\).
    Answer

    1. We should manipulate this equation a little bit so we can see exactly what lines up with the standard form. In standard form, I see subtractions inside the parentheses, so we should make that match by changing the \(+\) to minus-a-minus. And we should have somebody getting squared on the right hand side...

    \[ (x - (-2))^2 + (y-1)^2 = 4^2 \notag \]

    Now we can see that the center of the circle must be \( (-2, 1) \) and the radius must be \(4\).

    2. For this, we identify that the center we want is \( (h,k) = (1,2)\) and the radius we want is \(r = 5\). Then we just plug in to get \( (x-1)^2 + (y-2)^2 = 5^2 \).

    Here are the essential features of a circle that I expect you to know:

    • The radius is the uniform distance from the center to any point on the circle.
    • The diameter is the distance from one side of the circle across to the other, passing through the center, so it's double the radius. That is, diameter \( d = 2r\).
    • The area of a circle with radius \(r\) is \(\pi r^2\).
    • The circumference of a circle is the distance all the way around it, as in how many steps your Apple watch would say you covered if you walked the whole perimeter, and it's calculated \(2\pi r\).

    If you're given an equation containing \(x^2\) and \(y^2\) terms in it, and asked whether it's the equation of a circle or not, the only thing to do is try to get it to look like the standard form of a circle's equation. This means completing the square...twice!

    Example \(\PageIndex{4}\)

    Is \( x^2 + 2x + y^2 - 2y = 7 \) the equation of some circle? If so, tell the center and the radius.

    Solution

    We are aiming for something looking like \( (x-h)^2 + (y-k)^2 = r^2 \), and there are two perfect square products in there, so we will complete the square on the \(x\) terms AND on the \( y\) terms to try to make some perfect squares appear. First the \(x\)'s... We identify the coefficient \(b = 2\), so we need to add \( \left( \frac{b}{2} \right)^2= 1 \) to both sides of the equation.

    \[ (x^2 + 2x \quad \quad ) + y^2 - 2y = 7 \quad \longrightarrow \quad (x^2 + 2x \textcolor{red}{+1} ) + y^2 - 2y = 7 \textcolor{red}{+1} \notag \]

    Then factor and simplify to get \( (x+1)^2 + y^2 - 2y = 8 \). So far so good. Now the \(y\)'s... We identify the coefficient \(b = -2\) this time, so we will be adding \( \left( \frac{b}{2} \right)^2= 1\) again.

    \[ (x+1)^2 + (y^2 - 2y \quad \quad ) = 8 \quad \longrightarrow \quad (x+1)^2 + (y^2 - 2y\textcolor{red}{+1} ) = 8 \textcolor{red}{+1} \notag \]

    Finally, factor and simplify, and we have achieved our goal! We have \( (x+1)^2 + (y-1)^2 = 9 \), which looks exactly like the standard form. We read off the center to be \( (-1, 1)\) and the radius must be \(3\).

    Exercise \(\PageIndex{6}\)

    Prove that \( x^2 + 4x + y^2 + 2y + 1 = 0 \) is the equation of a circle by completing the square to find standard form. Then tell the center and radius of the circle.

    Answer

    The equation is \( (x+2)^2 + (y+1)^2 = 2^2 \) so the center is \( (-2, -1) \) and the radius is \(2\).

    Sketching a circle based on an equation is pretty straightforward in theory, if uhhhhhhhhhh aesthetically challenging in practice (well, unless you're Giotto). Really, you just identify and plot the center, and then draw four cardinal points at the appropriate distance away for the radius. And then do your darnedest to connect the dots in a nice circle.

    Exercise \(\PageIndex{7}\)

    Plot the circle with equation \( (x-1)^2 + (y+2)^2 = 3^2 \) on a coordinate plane.

    Answer

    Identify that the center is \( (1,-2)\) and that the radius is \(3\), and then channel your inner artiste.

    graphing circle.png


    3.3 Lines and Circles is shared under a CC BY-NC-SA license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?