Things you can do with Coordinate Geometry

If you know the coordinates of a group of points you can:

  • Determine the distance between them.
  • Find the midpoint, slope and equation of a line segment.
  • Determine if lines are parallel or perpendicular.
  • Find the area and perimeter of a polygon defined by the points.
  • Transform a shape by moving, rotating and reflecting it.
  • Define the equations of curves, circles and ellipses.

Distance Between Two Points (given their coordinates)

Given thecoordinatesof two points, the distance D between the points is given by:

wheredx is the difference between the x-coordinates of the pointsanddyis the difference between the y-coordinates of the points.

The formula above can be used to find the distance between two points when you know the coordinates of the points. This distance is also the length of theline segmentlinking the two points.

Thedistance formula is simply a use ofPythagoras' Theorem.

Notice, is thehypotenuseof a right triangle, where one side isdx (the difference in x-coordinates) and the other isdy(the difference in y-coordinates).

FromPythagoras' Theoremwe know that:AB2= dx2+ dy2

Solving this for AB gives us the formula:

Vertical and Horizontal Lines

If the line segment is vertical or horizontal, the formula above will still work, but there is an easier way. For a horizontal line, its length is the difference between the x-coordinates. For a vertical line its length is the difference between the y-coordinates.

A Practical Application

Interactive programsmake extensive use ofcoordinate geometry. The computer screens you look at are grids of thousands of tiny dots called pixels that together make up images. Each pixel is addressed using its (x,y) coordinates. Each pixel has a unique pair of coordinates. Programmers use coordinate geometry to code images on the computer screen.

Midpoint of a Line Segment

Also known as the Midpoint Theorem:

Thecoordinatesof themidpointof aline segmentare the average of the coordinates of its endpoints.

The midpoint can be found by using the following formula:
A line segment on thecoordinate planeis defined by two endpoints whosecoordinatesare known. The midpointof this line is exactly halfway between these endpoints and its location can be found using the Midpoint Theorem, which states:

  • Thex-coordinateof the midpoint is the average of thex-coordinatesof the two endpoints.
  • Likewise, they-coordinateis the average of they-coordinatesof the endpoints.

Along the x-axis: midway between 10 and 50 is 30.

Along the y-axis: midway between 10 and 20 is 15.

Look at this graphically in the figure above. Notice that on eachaxis, the black pointers from the midpoint C are always exactly halfway between the orange pointers from the endpoints A and B.

Slope of a Line

The slope of a line is a number that measures its "steepness", usually denoted by the letter m.

It is the change in y for a unit change in x along the line.

The slope of a line (also called the gradient of the line, the rate of change…) is a number that describes how "steep" it is.

In the figure above, notice that for every increase of one unit to the right along the horizontal x-axis, the line moves down a half unit.

It therefore has a slope of -.

To get from point A to B along the line, we have to move to the right 30 units and down 15.

Again, this is a half unit down for every unit across.

Because the line slopes downwards to the right, it has a negative slope. As x increases, ydecreases.

If the line sloped upwards to the right, the slope would be a positive number and we would say that as x increases y also increases.

Formula for the Slope

Given any two points on the line, its slope is given by the formulawhere:


OR
/ Axthex-coordinate of point A
Aythey-coordinate of point A
Bxthex-coordinate of point B
Bythey-coordinate of point B
y2they-coordinate of point B
y1they-coordinate of point A
x2thex-coordinate of point B
x1thex-coordinate of point A

It does not matter which point you choose for A or B. As long as they are both on the line somewhere and they are used consistently through the whole calculation, the formula will produce the correct slope.

Example

Refer to the previous diagram, substituting the coordinates for A and B into the formula, we get:

Finding the Slope by Inspection

Rather than just plugging numbers into the formula above, we can find the slope by understanding the concept and reasoning it out.

Refer to the line on the right, defined by two given points A, B. We can see that the line slopes up and to the right so the slope will be positive.

  1. Calculate dx, the horizontal distance from the left point to the right point. Since B is at (15,5) its x-coordinate is the first number, 15. The x-coordinate of A is 30. So the difference (dx) is 15.
  2. Calculate dy, the amount the line rises or falls as you go to the right. Since B is at (15,5) its y-coordinate is the second number or 5. The y-coordinate of A is 25. So the difference (dy) is 20.
    It is positive because the line goesupas you go to the right. It would have been negative otherwise.
  3. Dividing the rise (dy) by the run (dx):

A way to remember this method is "rise over run".

It is the "rise" - the up and down difference between the points, over the "run" - the horizontal run between them.

Just remember that rise going downwards is negative.

Slope Direction

The slope of a line can be positive, negative, zero or undefined.

Positive Slope

Here, yincreasesas x increases, so the line slopes upwards to the right. The slope will be a positive number. The line above has a slope of about, it goesupabout for every step of 1 along the x-axis.

Negative Slope

Here, ydecreasesas x increases, so the line slopes downwards to the right. The slope will be a negative number.

The line above has a slope of about, it goesdownabout for every step of 1 along the x-axis.

Zero Slope

Here, ydoes not changeas x increases, so the line in exactly horizontal.

The slope of any horizontal line is always zero.

The line above goes neither up nor down as x increases, so its slope is zero.

A horizontal line has an equation of the formy = b, wherebis the y-intercept.

Undefined Slope

When the line is exactly vertical, it does not have a defined slope.

The two x-coordinates are the same, so the difference is zero.

The slope calculation is then something like;(uh-oh, can’t do that!)

When you divide anything by zero the result has no meaning.

The line above is exactly vertical, so it has no defined slope. We say "the slope of the line AB is undefined".

A vertical line has an equation of the formx = a, whereais the x-intercept.

Equation of a Line

The slope (m) of a line is one of the elements in the equation of a line when written in the "slope-intercept" form:. Themin the equation is the slope of the line.

Slope as an Angle

The slope of the line can also be expressed as an angle, usually in degrees or radians.

Look at the figure above,by convention the angle is measured from any horizontal line (parallel to the x-axis). Lines with a positive slope (up and to the right) have a positive angle, and a negative angle for a negative slope.

To convert from slope m to slope angle and back:angle = arctan(m)

m = tan(angle)

Parallel Lines

Twolinesareparallelif they have the sameslope, or if they are bothvertical.

When two straightlinesare plotted on the coordinate plane, we can tell if they areparallelfrom theirslope. If the slopes are the same then the lines are parallel.

The slope can be found using any method that is convenient to you:

  • From two given points on the line.
  • From the equation of the line inslope-intercept form. []
  • From the equation of the line inpoint-slope form. []

When they are Vertical

Recall that if a line isverticalit has no defined slope. Vertical lines are parallel by definition.

A line is vertical if the x-coordinates of two points on the line are the same.

Example: Are two lines parallel?

In the figure above there are two lines. One line is defined by two points at (5, 5) and (25, 15). The other is defined by an equation inslope-intercept form. Decide if they are parallel.

For the top line, the slope is found using the coordinates of the two points that define the line.

For the lower line, the slope is taken directly from the formula. Recall that the slope-intercept formula is, wheremis the slope. So looking at the formula we see that the slope is .

The top line has a slope of, the lower line slope is, which are not equal. Therefore, the lines arenot parallel. The lines arevery closeto being parallel, and may look parallel, but appearance can deceive.

Example: Define a line parallel to a given line.

In the figure belowis defined by two points. Plot a line through the given point C parallel to.

First find the slope of the using the same method as the example above.

For the line to be parallel to it will have the same slope, and will pass through a given point, C(12,10). We therefore have enough information to define the line by its equation inpoint-slope form:

If we wanted to go ahead and actually plot the line we can do so by finding another point on the line using the equation and then draw the line through the two points.

Rectangle

A quadrilateral where all interior angles are 90°, and whose location on thecoordinate planeis determined by thecoordinatesof the fourvertices(corners).

A rectangle is placed in the coordinate plane witheach of the four vertices (corners) havingknowncoordinates. From these coordinates, various properties such as width, height etc. can be found.

  • Opposite sides are parallel and congruent.
  • The diagonals bisect each other.
  • The diagonals are congruent.

Dimensions of a Rectangle

The dimensions of the rectangle are found by calculating the distance between various corner points.

In the figure above:

  • The heightof the rectangle is the distance between A and B (or C to D).
  • The widthis the distance between B and C (or A to D).
  • The length of adiagonalis the distance between opposite corners, say B and D (orA to C since the diagonals are congruent).

This method will work even if the rectangle is rotated on the plane, as in the figure above.

But if the sides of the rectangle are parallel to the x and y-axes, then the calculations can be a little easier.

  • The heightis the difference in y-coordinates of any top and bottom point - for example A and B.
  • The widthis the difference in x-coordinates of any left and right point - for example B and D.

Example

  • The heightof the rectangle is the distance between the points A and B. (Using C and D will produce the same result). Use the formula for the distance between two points;
  • The widthis the distance between the points B and C. (Using A and D will produce the same result). Using the formula for the distance between two points;
  • The length of a diagonalsis the distance between B and D. (Using A and C will produce the same result). Using the formula for the distance between two points;

Rectangle Area and Perimeter

The area and perimeter of a rectangle can be found given thecoordinatesof itsvertices(corners).

Area

In coordinate geometry, the area of a rectangle is calculated in the usual way once the width and height are found. Once the width and height are known the area is found by multiplying the width by the height in the usual way.

The formula for the area is: Area = width height[A = lwor wh]

Perimeter

The perimeter of a rectangle (the total distance around the edge) is calculated in the usual way once the width and height are found. Once the width and height are known the perimeter is found by adding twice the width to twice the height to calculate the distance around the edge of the rectangle.

The formula for the perimeter is: Perimeter = (2 width) + (2 height)[P = 2w + 2h]

Example

Use the figure above.

  • The heightof the rectangle is the distance between the points A and B. (Using C and D will produce the same result). This one is 16.
  • The widthis the distance between the points B and C. (Using A and D will produce the same result). Theone above is 35.

Areais the width times height, or 16 35 = 560 units2

Perimeteris twice the width plus twice the height or (2 16) + (2 35) = 102 units

Square

A 4-sided regularpolygonwith all sides equal, all interior angles 90° and whose location on thecoordinate planeis determined by thecoordinatesof the fourvertices(corners).

From the coordinates of the four vertices, various properties such as width, height etc. can be found.
A square has the following properties:

  • All four sides arecongruent.
  • Opposite sides areparallel.
  • The diagonalsbisecteach other at right angles.
  • The diagonals arecongruent.

Dimensions of a Square

The dimensions of the square are found by calculating the distance between various corner points. Recall that we can find the distance between any two points if we know their coordinates.

  • The length of each sideof the square is the distance any two adjacent points (say AB, or AD)
  • The length of adiagonalsis the distance between opposite corners, say B and D (or A andC since the diagonals are congruent).

This method will work even if the square is rotated on the plane (see rectangle example). But if the sides of the square are parallel to the x and y-axes, then the calculations can be a little easier.

Example

  • The side lengthof the square is the distance between any two adjacentvertices. Let's pick B and C. Since that side is horizontal, by inspection we can find the length to be 22.
  • The length of a diagonalis the distance between any pair of opposite vertices. Using the distance formula we can find the distance from B to D:

In a square, the diagonal is always the length of a side times the square root of two (from 45, 45, 90 special right triangles):

Area and Perimeter of a Square

The area and perimeter of a square can be found given thecoordinatesof itsvertices(corners).

Area

The area of a square is calculated in the usual way once the length of a side is found. Once the side length is known the area is found by multiplying the side length by itself in the usual way. The formula for the area is:

area = s2 where s is the length of any side (they are all the same).

The "Diagonals" Method to find Area

If you know the length of a diagonal, the area is given by:

/
where dis the length of either diagonal

The length of a diagonal can be found by using the distance formula to find the distance between opposite vertices, say A and C in the figure.

Perimeter

A square has four sides which are all the same length. The perimeter of a square (the total distance around the edge) is therefore the four times the length of any side. Seesquare definition to see how the side length is calculated.

The formula for the perimeter is P = 4swhere s is the length of any side (they are all the same).

Example

Use the diagram given previously to calculate the area and perimeter, the example below assumes you know how to calculate the side length of the square.

  • The side lengthof the square is the distance between the points A and B. (Or any two adjacent vertices). Here, this is 22.
  • Areais the side length times itself, or 22 x 22 = 484
  • Perimeteris four times the side length or 4 x 22 = 88

Trapezoid

Aquadrilateralthat has one pair of parallel sides,and where theverticeshave knowncoordinates.

Altitude of a Trapezoid

In the previous figure, the altitude is the perpendicular distance between the two bases (parallel sides). To find this distance, we can use the distance formula from a point to a line. For the point, we use any vertex, and for the line we use the opposite base. In the figure above we have used the distance from point B to the opposite base AD.

This method will work even if the trapezoid is rotated on the plane, but if the sides of the trapezoid are parallel to the x and y-axes, then the calculations can be a little easier. The altitude is then the difference in y-coordinates of any point on each base, for example A and B.

Median of a Trapezoid

Recallthat the median is a line segment linking the midpoints of the two legs of the trapezoid. (The legs are the two non-parallel sides.) We can find the midpoint of a leg by using the midpoint formula. By applying this twice, once for each leg, the median can be drawn between them.

The length of the median can be found in two ways:

  1. The median length is the average of the two bases (parallel sides). Find the length of each base by using the distance formula. Then find the average of these two lengths by adding them and dividing by 2.
  2. Find the midpoints of the legs using the midpoint formula, and then find the distance between them using the distance formula.

Examples

In the worked examples below, we will calculate the properties of the trapezoid in the previous figure.

  • The altitude of the trapezoid.
    Since in this case the bases (parallel sides) of the trapezoid are parallel to the x-axis, the altitude can be found as the difference between the y-coordinates of any point on each base. Let's pick B and A. The y-coordinate of B is 31, and the y-coordinate of A is 7, so:

Altitude = 31–7 = 24