Skip to main content
Mathematics LibreTexts

1.2: The Rectangular Coordinate Systems and Graphs

  • Page ID
    29105
  • \( \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
    • Plot ordered pairs in a Cartesian coordinate system.
    • Graph equations by plotting points.
    • Graph equations with a graphing utility.
    • Find \(x\)-intercepts and \(y\)-intercepts.
    • Use the distance formula.
    • Use the midpoint formula.

    Tracie set out from Elmhurst, IL, to go to Franklin Park. On the way, she made a few stops to do errands. Each stop is indicated by a red dot in Figure \(\PageIndex{1}\). Laying a rectangular coordinate grid over the map, we can see that each stop aligns with an intersection of grid lines. In this section, we will learn how to use grid lines to describe locations and changes in locations.

    Road map of a city with street names on an x, y coordinate grid. Various points are marked in red on the grid lines indicating different locations on the map.
    Figure \(\PageIndex{1}\)

    Plotting Ordered Pairs in the Cartesian Coordinate System

    An old story describes how seventeenth-century philosopher/mathematician René Descartes invented the system that has become the foundation of algebra while sick in bed. According to the story, Descartes was staring at a fly crawling on the ceiling when he realized that he could describe the fly’s location in relation to the perpendicular lines formed by the adjacent walls of his room. He viewed the perpendicular lines as horizontal and vertical axes. Further, by dividing each axis into equal unit lengths, Descartes saw that it was possible to locate any object in a two-dimensional plane using just two numbers—the displacement from the horizontal axis and the displacement from the vertical axis.

    While there is evidence that ideas similar to Descartes’ grid system existed centuries earlier, it was Descartes who introduced the components that comprise the Cartesian coordinate system, a grid system having perpendicular axes. Descartes named the horizontal axis the \(x\)-axis and the vertical axis the \(y\)-axis.

    The Cartesian coordinate system, also called the rectangular coordinate system, is based on a two-dimensional plane consisting of the \(x\)-axis and the \(y\)-axis. Perpendicular to each other, the axes divide the plane into four sections. Each section is called a quadrant; the quadrants are numbered counterclockwise as shown in Figure \(\PageIndex{2}\).

    This is an image of an x, y plane with the axes labeled. The upper right section is labeled: Quadrant I.  The upper left section is labeled: Quadrant II.  The lower left section is labeled: Quadrant III.  The lower right section is labeled: Quadrant IV.
    Figure \(\PageIndex{2}\)

    The center of the plane is the point at which the two axes cross. It is known as the origin, or point \((0,0)\). From the origin, each axis is further divided into equal units: increasing, positive numbers to the right on the \(x\)-axis and up the \(y\)-axis; decreasing, negative numbers to the left on the \(x\)-axis and down the \(y\)-axis. The axes extend to positive and negative infinity as shown by the arrowheads in Figure \(\PageIndex{3}\).

    This is an image of an x, y coordinate plane.  The x and y axis range from negative 5 to 5.
    Figure \(\PageIndex{3}\)

    Each point in the plane is identified by its \(x\)-coordinate, or horizontal displacement from the origin, and its \(y\)-coordinate, or vertical displacement from the origin. Together, we write them as an ordered pair indicating the combined distance from the origin in the form \((x,y)\). An ordered pair is also known as a coordinate pair because it consists of \(x\)- and \(y\)-coordinates. For example, we can represent the point \((3,−1)\) in the plane by moving three units to the right of the origin in the horizontal direction, and one unit down in the vertical direction. See Figure \(\PageIndex{4}\).

    This is an image of an x, y coordinate plane. The x and y axis range from negative 5 to 5.  The point (3, -1) is labeled.  An arrow extends rightward from the origin 3 units and another arrow extends downward one unit from the end of that arrow to the point.
    Figure \(\PageIndex{4}\)

    When dividing the axes into equally spaced increments, note that the \(x\)-axis may be considered separately from the \(y\)-axis. In other words, while the \(x\)-axis may be divided and labeled according to consecutive integers, the \(y\)-axis may be divided and labeled by increments of \(2\), or \(10\), or \(100\). In fact, the axes may represent other units, such as years against the balance in a savings account, or quantity against cost, and so on. Consider the rectangular coordinate system primarily as a method for showing the relationship between two quantities.

    Cartesian Coordinate System

    A two-dimensional plane where the

    • \(x\)-axis is the horizontal axis
    • \(y\)-axis is the vertical axis

    A point in the plane is defined as an ordered pair, \((x,y)\), such that \(x\) is determined by its horizontal distance from the origin and \(y\) is determined by its vertical distance from the origin.

    Example \(\PageIndex{1}\): Plotting Points in a Rectangular Coordinate System

    Plot the points \((−2,4)\), \((3,3)\), and \((0,−3)\) in the plane.

    Solution

    To plot the point \((−2,4)\), begin at the origin. The \(x\)-coordinate is \(–2\), so move two units to the left. The \(y\)-coordinate is \(4\), so then move four units up in the positive \(y\) direction.

    To plot the point \((3,3)\), begin again at the origin. The \(x\)-coordinate is \(3\), so move three units to the right. The \(y\)-coordinate is also \(3\), so move three units up in the positive \(y\) direction.

    To plot the point \((0,−3)\), begin again at the origin. The \(x\)-coordinate is \(0\). This tells us not to move in either direction along the \(x\)-axis. The \(y\)-coordinate is \(–3\), so move three units down in the negative \(y\) direction. See the graph in Figure \(\PageIndex{5}\).

    This is an image of a graph on an x, y coordinate plane. The x and y axes range from negative 5 to 5.  The points (-2, 4); (3, 3); and (0, -3) are labeled.  Arrows extend from the origin to the points.
    Figure \(\PageIndex{5}\)
    Analysis

    Note that when either coordinate is zero, the point must be on an axis. If the \(x\)-coordinate is zero, the point is on the \(y\)-axis. If the \(y\)-coordinate is zero, the point is on the \(x\)-axis.

    Graphing Equations by Plotting Points

    We can plot a set of points to represent an equation. When such an equation contains both an \(x\) variable and a \(y\) variable, it is called an equation in two variables. Its graph is called a graph in two variables. Any graph on a two-dimensional plane is a graph in two variables.

    Suppose we want to graph the equation \(y=2x−1\). We can begin by substituting a value for \(x\) into the equation and determining the resulting value of \(y\). Each pair of \(x\)- and \(y\)-values is an ordered pair that can be plotted. Table \(\PageIndex{1}\) lists values of \(x\) from \(–3\) to \(3\) and the resulting values for \(y\).

    Table \(\PageIndex{1}\)
    \(x\) \(y=2x−1\) \((x,y)\)
    \(−3\) \(y=2(−3)−1=−7\) \((−3,−7)\)
    \(−2\) \(y=2(−2)−1=−5\) \((−2,−5)\)
    \(−1\) \(y=2(−1)−1=−3\) \((−1,−3)\)
    \(0\) \(y=2(0)−1=−1\) \((0,−1)\)
    \(1\) \(y=2(1)−1=1\) \((1,1)\)
    \(2\) \(y=2(2)−1=3\) \((2,3)\)
    \(3\) \(y=2(3)−1=5\) \((3,5)\)

    We can plot the points in the table. The points for this particular equation form a line, so we can connect them (Figure \(\PageIndex{6}\)). This is not true for all equations.

    This is a graph of a line on an x, y coordinate plane. The x- and y-axis range from negative 8 to 8.  A line passes through the points (-3, -7); (-2, -5); (-1, -3); (0, -1); (1, 1); (2, 3); and (3, 5).
    Figure \(\PageIndex{6}\)

    Note that the \(x\)-values chosen are arbitrary, regardless of the type of equation we are graphing. Of course, some situations may require particular values of \(x\) to be plotted in order to see a particular result. Otherwise, it is logical to choose values that can be calculated easily, and it is always a good idea to choose values that are both negative and positive. There is no rule dictating how many points to plot, although we need at least two to graph a line. Keep in mind, however, that the more points we plot, the more accurately we can sketch the graph.

    Howto: Given an equation, graph by plotting points
    1. Make a table with one column labeled \(x\), a second column labeled with the equation, and a third column listing the resulting ordered pairs.
    2. Enter \(x\)-values down the first column using positive and negative values. Selecting the \(x\)-values in numerical order will make the graphing simpler.
    3. Select \(x\)-values that will yield \(y\)-values with little effort, preferably ones that can be calculated mentally.
    4. Plot the ordered pairs.
    5. Connect the points if they form a line.
    Example \(\PageIndex{2}\): Graphing an Equation in Two Variables by Plotting Points

    Graph the equation \(y=−x+2\) by plotting points.

    Solution

    First, we construct a table similar to Table \(\PageIndex{2}\). Choose \(x\) values and calculate \(y\).

    Table \(\PageIndex{2}\)
    \(x\) \(y=−x+2\) \((x,y)\)
    \(−5\) \(y=−(−5)+2=7\) \((−5,7)\)
    \(−3\) \(y=−(−3)+2=5\) \((−3,5)\)
    \(−1\) \(y=−(−1)+2=3\) \((−1,3)\)
    \(0\) \(y=−(0)+2=2\) \((0,2)\)
    \(1\) \(y=−(1)+2=1\) \((1,1)\)
    \(3\) \(y=−(3)+2=−1\) \((3,−1)\)
    \(5\) \(y=−(5)+2=−3\) \((5,−3)\)

    Now, plot the points. Connect them if they form a line. See Figure \(\PageIndex{7}\).

    This image is a graph of a line on an x, y coordinate plane. The x-axis includes numbers that range from negative 7 to 7. The y-axis includes numbers that range from negative 5 to 8.  A line passes through the  points: (-5, 7); (-3, 5); (-1, 3); (0, 2); (1, 1); (3, -1); and (5, -3).
    Figure \(\PageIndex{7}\)
    Exercise \(\PageIndex{1}\)

    Construct a table and graph the equation by plotting points: \(y=\dfrac{1}{2}x+2\).

    Answer

    Please see Table \(\PageIndex{3}\) and graph below.

    Table \(\PageIndex{3}\)
    \(x\) \(y = 12x + 2\) \((x,y)\)
    \(-2\) \(y=12(−2)+2=1\) \((−2,1)\)
    \(-1\) \(y=12(−1)+2=32\) \((−1,32)\)
    \(0\) \(y=12(0)+2=2\) \((0,2)\)
    \(1\) \(y=12(1)+2=52\) \((1,52)\)
    \(2\) \(y=12(2)+2=3\) \((2,3)\)
    This is an image of a graph on an x, y coordinate plane. The x and y-axis range from negative 5 to 5.  A line passes through the points (-2, 1); (-1, 3/2); (0, 2); (1, 5/2); and (2, 3).
    Figure \(\PageIndex{8}\)

    Graphing Equations with a Graphing Utility

    Most graphing calculators require similar techniques to graph an equation. The equations sometimes have to be manipulated so they are written in the style \(y=\)_____ . The TI-84 Plus, and many other calculator makes and models, have a mode function, which allows the window (the screen for viewing the graph) to be altered so the pertinent parts of a graph can be seen.

    For example, the equation \(y=2x−20\) has been entered in the TI-84 Plus shown in Figure \(\PageIndex{9a}\). In Figure \(\PageIndex{9b}\), the resulting graph is shown. Notice that we cannot see on the screen where the graph crosses the axes. The standard window screen on the TI-84 Plus shows \(−10≤x≤10\), and \(−10≤y≤10\). See Figure \(\PageIndex{9c}\).

    This is an image of three side-by-side calculator screen captures.  The first screen is the plot screen with the function y sub 1 equals two times x minus twenty.  The second screen shows the plotted line on the coordinate plane.  The third screen shows the window edit screen with the following settings: Xmin = -10; Xmax = 10; Xscl = 1; Ymin = -10; Ymax = 10; Yscl = 1; Xres = 1.
    Figure \(\PageIndex{9}\): a. Enter the equation. b. This is the graph in the original window. c. These are the original settings.

    By changing the window to show more of the positive \(x\)-axis and more of the negative \(y\)-axis, we have a much better view of the graph and the \(x\)- and \(y\)-intercepts. See Figure \(\PageIndex{10a}\) and Figure \(\PageIndex{10b}\).

    This is an image of two side-by-side calculator screen captures.  The first screen is the window edit screen with the following settings: Xmin = negative 5; Xmax = 15; Xscl = 1; Ymin = -30; Ymax = 10; Yscl = 1; Xres =1.  The second screen shows the plot of the previous graph, but is more centered on the line.
    Figure \(\PageIndex{10}\): a. This screen shows the new window settings. b. We can clearly view the intercepts in the new window.
    Example \(\PageIndex{3}\): Using a Graphing Utility to Graph an Equation

    Use a graphing utility to graph the equation: \(y=−\dfrac{2}{3}x−\dfrac{4}{3}\).

    Solution

    Enter the equation in the \(y = \text{ function}\) of the calculator. Set the window settings so that both the \(x\)- and \(y\)- intercepts are showing in the window. See Figure \(\PageIndex{11}\).

    This image is of a line graph on an x, y coordinate plane. The x-axis has numbers that range from negative 3 to 4. The y-axis has numbers that range from negative 3 to 3.  The function y = -2x/3 + 4/3 is plotted.
    Figure \(\PageIndex{11}\)

    Finding \(x\)-intercepts and \(y\)-intercepts

    The intercepts of a graph are points at which the graph crosses the axes. The \(x\)-intercept is the point at which the graph crosses the \(x\)-axis. At this point, the \(y\)-coordinate is zero. The \(y\)-intercept is the point at which the graph crosses the \(y\)-axis. At this point, the \(x\)-coordinate is zero.

    To determine the \(x\)-intercept, we set \(y\) equal to zero and solve for \(x\). Similarly, to determine the \(y\)-intercept, we set \(x\) equal to zero and solve for \(y\). For example, lets find the intercepts of the equation \(y=3x−1\).

    To find the \(x\)-intercept, set \(y=0\).

    \[\begin{align*} y &= 3x - 1\\ 0 &= 3x - 1\\ 1 &= 3x\\ \dfrac{1}{3}&= x \end{align*}\]

    \(x\)−intercept: \(\left(\dfrac{1}{3},0\right)\)

    To find the \(y\)-intercept, set \(x=0\).

    \[\begin{align*} y &= 3x - 1\\ y &= 3(0) - 1\\ y &= -1 \end{align*}\]

    \(y\)−intercept: \((0,−1)\)

    We can confirm that our results make sense by observing a graph of the equation as in Figure \(\PageIndex{12}\). Notice that the graph crosses the axes where we predicted it would.

    This is an image of a line graph on an x, y coordinate plane. The x and y-axis range from negative 4 to 4.  The function y = 3x – 1 is plotted on the coordinate plane
    Figure \(\PageIndex{12}\)
    Howto: GIVEN AN EQUATION, FIND THE INTERCEPTS
    1. Find the \(x\)-intercept by setting \(y=0\) and solving for \(x\).
    2. Find the \(y\)-intercept by setting \(x=0\) and solving for \(y\).
    Example \(\PageIndex{4}\): Finding the Intercepts of the Given Equation

    Find the intercepts of the equation \(y=−3x−4\). Then sketch the graph using only the intercepts.

    Solution

    Set \(y=0\) to find the \(x\)-intercept.

    \[\begin{align*} y &= -3x - 4\\ 0 &= -3x - 4\\ 4 &= -3x\\ \dfrac{4}{3}&= x \end{align*}\]

    \(x\)−intercept: \(\left(−\dfrac{4}{3},0\right)\)

    Set \(x=0\) to find the \(y\)-intercept.

    \[\begin{align*} y &= -3x - 4\\ y &= -3(0) - 4\\ y &= -4 \end{align*}\]

    \(y\)−intercept: \((0,−4)\)

    Plot both points, and draw a line passing through them as in Figure \(\PageIndex{13}\).

    This is an image of a line graph on an x, y coordinate plane. The x-axis ranges from negative 5 to 5. The y-axis ranges from negative 6 to 3.  The line passes through the points (-4/3, 0) and (0, -4).
    Figure \(\PageIndex{13}\)
    Exercise \(\PageIndex{2}\)

    Find the intercepts of the equation and sketch the graph: \(y=−\dfrac{3}{4}x+3\).

    Answer

    \(x\)-intercept is \((4,0)\); \(y\)-intercept is \((0,3)\)

    This is an image of a line graph on an x, y coordinate plane. The x and y axes range from negative 4 to 6.  The function y = -3x/4 + 3 is plotted.
    Figure \(\PageIndex{14}\)

    Using the Distance Formula

    Derived from the Pythagorean Theorem, the distance formula is used to find the distance between two points in the plane. The Pythagorean Theorem, \(a^2+b^2=c^2\), is based on a right triangle where \(a\) and \(b\) are the lengths of the legs adjacent to the right angle, and \(c\) is the length of the hypotenuse. See Figure \(\PageIndex{15}\).

    This is an image of a triangle on an x, y coordinate plane. The x and y axes range from 0 to 7. The points (x sub 1, y sub 1); (x sub 2, y sub 1); and (x sub 2, y sub 2) are labeled and connected to form a triangle.  Along the base of the triangle, the following equation is displayed: the absolute value of x sub 2 minus x sub 1 equals a. The hypotenuse of the triangle is labeled: d = c.  The remaining side is labeled: the absolute value of y sub 2 minus y sub 1 equals b.
    Figure \(\PageIndex{15}\)

    The relationship of sides \(|x_2−x_1|\) and \(|y_2−y_1|\) to side \(d\) is the same as that of sides \(a\) and \(b\) to side \(c\). We use the absolute value symbol to indicate that the length is a positive number because the absolute value of any number is positive. (For example, \(|-3|=3\). ) The symbols \(|x_2−x_1|\) and \(|y_2−y_1|\) indicate that the lengths of the sides of the triangle are positive. To find the length \(c\), take the square root of both sides of the Pythagorean Theorem.

    \[c^2=a^2+b^2\rightarrow c=\sqrt{a^2+b^2}\]

    It follows that the distance formula is given as

    \[d^2={(x_2−x_1)}^2+{(y_2−y_1)}^2\rightarrow d=\sqrt{{(x_2−x_1)}^2+{(y_2−y_1)}^2}\]

    We do not have to use the absolute value symbols in this definition because any number squared is positive.

    distance between two points

    Given endpoints \((x_1,y_1)\) and \((x_2,y_2)\), the distance between two points is given by

    \[d=\sqrt{{(x_2−x_1)}^2+{(y_2−y_1)}^2}\]

    Example \(\PageIndex{5}\): Finding the Distance between Two Points

    Find the distance between the points \((−3,−1)\) and \((2,3)\).

    Solution

    Let us first look at the graph of the two points. Connect the points to form a right triangle as in Figure \(\PageIndex{16}\)

    This is an image of a triangle on an x, y coordinate plane. The x-axis ranges from negative 4 to 4. The y-axis ranges from negative 2 to 4.  The points (-3, -1); (2, -1); and (2, 3) are plotted and labeled on the graph.  The points are connected to form a triangle
    Figure \(\PageIndex{16}\)

    Then, calculate the length of \(d\) using the distance formula.

    \[\begin{align*} d&= \sqrt{{(x_2 - x_1)}^2+{(y_2 - y_1)}^2}\\ &= \sqrt{{(2-(-3))}^2+{(3-(-1))}^2}\\ &= \sqrt{{(5)}^2+{(4)}^2}\\ &= \sqrt{25+16}\\ &= \sqrt{41} \end{align*}\]

    Exercise \(\PageIndex{3}\)

    Find the distance between two points: \((1,4)\) and \((11,9)\).

    Answer

    \(\sqrt{125}=5\sqrt{5}\)

    Example \(\PageIndex{6}\): Finding the Distance between Two Locations

    Let’s return to the situation introduced at the beginning of this section.

    Tracie set out from Elmhurst, IL, to go to Franklin Park. On the way, she made a few stops to do errands. Each stop is indicated by a red dot in Figure \(\PageIndex{1}\). Find the total distance that Tracie traveled. Compare this with the distance between her starting and final positions.

    Solution

    The first thing we should do is identify ordered pairs to describe each position. If we set the starting position at the origin, we can identify each of the other points by counting units east (right) and north (up) on the grid. For example, the first stop is \(1\) block east and \(1\) block north, so it is at \((1,1)\). The next stop is \(5\) blocks to the east, so it is at \((5,1)\). After that, she traveled \(3\) blocks east and \(2\) blocks north to \((8,3)\). Lastly, she traveled \(4\) blocks north to \((8,7)\). We can label these points on the grid as in Figure \(\PageIndex{17}\).

    This is an image of a road map of a city. The point (1, 1) is on North Avenue and Bertau Avenue.  The point (5, 1) is on North Avenue and Wolf Road.  The point (8, 3) is on Mannheim Road and McLean Street.  The point (8, 7) is on Mannheim Road and Schiller Avenue.
    Figure \(\PageIndex{17}\)

    Next, we can calculate the distance. Note that each grid unit represents \(1,000\) feet.

    • From her starting location to her first stop at \((1,1)\), Tracie might have driven north \(1,000\) feet and then east \(1,000\) feet, or vice versa. Either way, she drove \(2,000\) feet to her first stop.
    • Her second stop is at \((5,1)\). So from \((1,1)\) to \((5,1)\), Tracie drove east \(4,000\) feet.
    • Her third stop is at \((8,3)\). There are a number of routes from \((5,1)\) to \((8,3)\). Whatever route Tracie decided to use, the distance is the same, as there are no angular streets between the two points. Let’s say she drove east \(3,000\) feet and then north \(2,000\) feet for a total of \(5,000\) feet.
    • Tracie’s final stop is at \((8,7)\). This is a straight drive north from \((8,3)\) for a total of \(4,000\) feet.

    Next, we will add the distances listed in Table \(\PageIndex{4}\).

    Table \(\PageIndex{4}\)
    From/To Number of Feet Driven
    \((0,0)\) to \((1,1)\) \(2,000\)
    \((1,1)\) to \((5,1)\) \(4,000\)
    \((5,1)\) to \((8,3)\) \(5,000\)
    \((8,3)\) to \((8,7)\) \(4,000\)
    Total \(15,000\)

    The total distance Tracie drove is \(15,000\) feet, or \(2.84\) miles. This is not, however, the actual distance between her starting and ending positions. To find this distance, we can use the distance formula between the points \((0,0)\) and \((8,7)\).

    \[\begin{align*} d&= \sqrt{{(0-8)}^2+{(7-0)}^2}\\ &= \sqrt{64+49}\\ &= \sqrt{113}\\ &= 10.63 \text{ units} \end{align*}\]

    At \(1,000\) feet per grid unit, the distance between Elmhurst, IL, to Franklin Park is \(10,630.14\) feet, or \(2.01\) miles. The distance formula results in a shorter calculation because it is based on the hypotenuse of a right triangle, a straight diagonal from the origin to the point \((8,7)\). Perhaps you have heard the saying “as the crow flies,” which means the shortest distance between two points because a crow can fly in a straight line even though a person on the ground has to travel a longer distance on existing roadways.

    Using the Midpoint Formula

    When the endpoints of a line segment are known, we can find the point midway between them. This point is known as the midpoint and the formula is known as the midpoint formula. Given the endpoints of a line segment, \((x_1,y_1)\) and \((x_2,y_2)\), the midpoint formula states how to find the coordinates of the midpoint M.

    \[M=\left (\dfrac{x_1+x_2}{2}, \dfrac{y_1+y_2}{2} \right )\]

    A graphical view of a midpoint is shown in Figure \(\PageIndex{18}\). Notice that the line segments on either side of the midpoint are congruent.

    This is a line graph on an x, y coordinate plane with the x and y axes ranging from 0 to 6. The points (x sub 1, y sub 1), (x sub 2, y sub 2), and (x sub 1 plus x sub 2 all over 2, y sub 1 plus y sub 2 all over 2) are plotted.  A straight line runs through these three points. Pairs of short parallel lines bisect the two sections of the line to note that they are equivalent.
    Figure \(\PageIndex{18}\)
    Example \(\PageIndex{7}\): Finding the Midpoint of the Line Segment

    Find the midpoint of the line segment with the endpoints \((7,−2)\) and \((9,5)\).

    Solution

    Use the formula to find the midpoint of the line segment.

    \[\begin{align*} \left (\dfrac{x_1+x_2}{2},\dfrac{y_1+y_2}{2} \right )&= \left (\dfrac{7+9}{2},\dfrac{-2+5}{2} \right )\\ &= \left (8,\dfrac{3}{2} \right ) \end{align*}\]

    Exercise \(\PageIndex{4}\)

    Find the midpoint of the line segment with endpoints \((−2,−1)\) and \((−8,6)\).

    Answer

    \(\left (-5,\dfrac{5}{2} \right )\)

    Example \(\PageIndex{8}\): Finding the Center of a Circle

    The diameter of a circle has endpoints \((−1,−4)\) and \((5,−4)\). Find the center of the circle.

    Solution

    The center of a circle is the center, or midpoint, of its diameter. Thus, the midpoint formula will yield the center point.

    \[\begin{align*} \left (\dfrac{x_1+x_2}{2},\dfrac{y_1+y_2}{2} \right )&= \left (\dfrac{-1+5}{2},\dfrac{-4-4}{2}) \right )\\ &= \left (\dfrac{4}{2},-\dfrac{8}{2} \right )\\ &= (2,4) \end{align*}\]

    Media

    Access these online resources for additional instruction and practice with the Cartesian coordinate system.

    1. Plotting points on the coordinate plane

    2. Find x and y intercepts based on the graph of a line

    Key Concepts

    • We can locate, or plot, points in the Cartesian coordinate system using ordered pairs, which are defined as displacement from the \(x\)-axis and displacement from the \(y\)-axis. See Example.
    • An equation can be graphed in the plane by creating a table of values and plotting points. See Example.
    • Using a graphing calculator or a computer program makes graphing equations faster and more accurate. Equations usually have to be entered in the form \(y=\)_____. See Example.
    • Finding the \(x\)- and \(y\)-intercepts can define the graph of a line. These are the points where the graph crosses the axes. See Example.
    • The distance formula is derived from the Pythagorean Theorem and is used to find the length of a line segment. See Example and Example.
    • The midpoint formula provides a method of finding the coordinates of the midpoint dividing the sum of the \(x\)-coordinates and the sum of the \(y\)-coordinates of the endpoints by \(2\). See Example and Example.

    This page titled 1.2: The Rectangular Coordinate Systems and Graphs is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by OpenStax via source content that was edited to the style and standards of the LibreTexts platform.