Skip to content
Geometry · Chapter 38

Coordinate Geometry

Put the picture on a grid: lines become equations, lengths become square roots, and any polygon's area comes from the shoelace formula or Pick's theorem.

You'll need
open on YouTube
38.10%

Line in Coordinate Plane

In this section you will be able to turn lines into equations: slope, both forms of a line, the distance formula and the distance from a point to a line.

Put the picture on a grid and geometry becomes algebra. Every line is an equation, and every length is a square root.

Two points pin down a line. Its slope is rise over run, and it is also tan⁡θ\tan\theta, where θ\theta is the angle the line makes with the xx-axis.

Lengths come from the Pythagorean theorem in disguise: the distance formula. The shortest way from a point to a line is straight along the perpendicular, and one formula gives that length directly.

Look: when a problem gives a rectangle or a right angle, put a corner at the origin and the sides on the axes. The numbers get small and the equations get easy.

Exploreplay first, formulas later

Line through A(1, 1) and B(5, 4): slope 3/4, angle 36.9°, 3x − 4y + 1 = 0

A(1, 1)B(5, 4)
m=riserun=34m = \dfrac{\text{rise}}{\text{run}} = \dfrac{3}{4}
θ≈36.9∘, tan⁡θ=34\theta \approx 36.9^\circ,\ \tan\theta = \tfrac{3}{4}
y=34x+14y = \tfrac{3}{4}x + \tfrac{1}{4}
3x−4y+1=03x - 4y + 1 = 0
x-intercept: −13,y-intercept: 14\text{x-intercept: } -\tfrac{1}{3},\quad \text{y-intercept: } \tfrac{1}{4}

Line through A(1, 1) and B(5, 4): slope 3/4, angle 36.9°, 3x − 4y + 1 = 0

Name it

Definition 38.1.1 · Equation of a Line

The equation of a line is

ax+by+c=0.ax + by + c = 0.

Remark 38.1.7

Be careful not to get the equation of the line confused with ax+by=cax + by = c. In ax+by=cax + by = c the constant sits on the other side, so its sign flips when you move it over.

Definition 38.1.2 · Slope-Intercept Form

An equation of a line in slope-intercept form is

y=mx+b,y = mx + b,

where mm is the slope and bb is the yy-intercept.

Theorem 38.1.3 · Slope of a line through 2 points

The slope of a line passing through 2 points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) is

y2−y1x2−x1.\frac{y_2 - y_1}{x_2 - x_1}.

Theorem 38.1.4 · Slope of a line through angle

The slope of a line with an angle of θ\theta above the xx-axis is

tan⁡θ.\tan\theta.

Theorem 38.1.5 · Distance between 2 points

The distance between 2 points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) is

(x1−x2)2+(y1−y2)2.\sqrt{(x_1 - x_2)^2 + (y_1 - y_2)^2}.

Theorem 38.1.6 · Point to line formula

The distance between a point (x0,y0)(x_0, y_0) and a line ax+by+c=0ax + by + c = 0 is

∣ax0+by0+c∣a2+b2.\frac{|a x_0 + b y_0 + c|}{\sqrt{a^2 + b^2}}.

Remark 38.1.9

This formula is a bit confusing, so here is an easy way to remember the numerator: it's just the equation of the line with the point's coordinates plugged in as the xx and yy values.

Watch itpredict, then reveal

Example 38.3

AMC 10

In rectangle ABCDABCD, AB=6AB = 6 and BC=3BC = 3. Point EE between BB and CC, and point FF between EE and CC are such that BE=EF=FCBE = EF = FC. Segments AE‾\overline{AE} and AF‾\overline{AF} intersect BD‾\overline{BD} at PP and QQ, respectively. The ratio BP:PQ:QDBP : PQ : QD can be written as r:s:tr : s : t where the greatest common factor of rr, ss, and tt is 11. What is r+s+tr + s + t?

Coordinate plane (its total is revealed at the end of the example)

Figure on the coordinate plane: A, B, C, D, E, F

  1. 1

    Put DD at the origin: D=(0,0)D = (0, 0), C=(6,0)C = (6, 0), B=(6,3)B = (6, 3), A=(0,3)A = (0, 3). Side BCBC is cut into thirds. Where are EE and FF?

open on YouTube

Try it

Problem 38.5.9(additional)

AMC 10

The line 12x+5y=6012x + 5y = 60 forms a triangle with the coordinate axes. What is the sum of the lengths of the altitudes of this triangle?

Contest cornerreal contest problems

Problem 38.5.2

AMC 12

A laser is placed at the point (3,5)(3, 5). The laser beam travels in a straight line. Larry wants the beam to hit and bounce off the yy-axis, then hit and bounce off the xx-axis, then hit the point (7,5)(7, 5). What is the total distance the beam will travel along this path?

Problem 38.5.3

AMC 10/12

The point P(a,b)P(a, b) in the xyxy-plane is first rotated counterclockwise by 90∘90^\circ around the point (1,5)(1, 5) and then reflected about the line y=−xy = -x. The image of PP after these two transformations is at (−6,3)(-6, 3). What is b−ab - a?

P(3, 1) → P′(5, 7) → P′′(−7, −5)

moves2
P
1. rotate 90° counter-clockwise about (1, 5)
2. reflect in the line y = −x
P(3,1)→P′(5,7)→P′′(−7,−5)P(3, 1) \to P'(5, 7) \to P''(-7, -5)

P(3, 1) → P′(5, 7) → P′′(−7, −5)

Problem 38.5.4

AMC 10

The line segment from A(1,2)A(1, 2) to B(3,3)B(3, 3) can be transformed to the line segment from A′(3,1)A'(3, 1) to B′(4,3)B'(4, 3), sending AA to A′A' and BB to B′B', by a rotation centered at the point P(s,t)P(s, t). What is ∣s−t∣|s - t|?

A(1, 2). B(3, 3)

AB

A(1, 2). B(3, 3)

Problem 38.5.11(additional)

AMC 10

The lines with equations ax−2y=cax - 2y = c and 2x+by=−c2x + by = -c are perpendicular and intersect at (1,−5)(1, -5). What is cc?

Problem 38.5.15(additional)

AMC 12

Two lines with slopes 12\frac{1}{2} and 22 intersect at (2,2)(2, 2). What is the area of the triangle enclosed by these two lines and the line x+y=10x + y = 10?

Checkpoint for section 38.1

Get 2 of 3 right to master this section. One try each, no hints.
1

What is the slope of the line through (2,−1)(2, -1) and (6,7)(6, 7)?

2

What is the distance from the point (1,2)(1, 2) to the line 3x+4y=13x + 4y = 1?

3

Triangle ABCABC has vertices A=(3,0)A = (3, 0), B=(0,3)B = (0, 3), and CC, where CC is on the line x+y=7x + y = 7. What is the area of △ABC\triangle ABC?

38.20%

Circle in Coordinate Plane

In this section you will be able to write the equation of a circle from its center and radius, and read the center and radius back off an equation.

A circle is every point at distance r from a center. Square the distance formula and you have its equation.

The point (x,y)(x, y) is on the circle with center (a,b)(a, b) and radius rr exactly when (x−a)2+(y−b)2=r2(x - a)^2 + (y - b)^2 = r^2.

Going backwards takes one move: complete the square in xx and in yy. Then the center and the radius can be read straight off.

Tangent circles are easiest with coordinates too. Put the centers where the distances are simple, and subtract one circle’s equation from another to kill the squared terms.

Exploreplay first, formulas later

Circle with center (3, 2) and radius 3: x² + y² + (−6)x + (−4)y + (4) = 0

radius r3
O(3, 2)
(x−3)2+(y−2)2=9(x - 3)^2 + (y - 2)^2 = 9
x2+y2−6x−4y+4=0x^2 + y^2 - 6x - 4y + 4 = 0

Circle with center (3, 2) and radius 3: x² + y² + (−6)x + (−4)y + (4) = 0

Name it

Theorem 38.2.1 · Equation of a Circle

A circle with center (a,b)(a, b) and radius rr has equation

(x−a)2+(y−b)2=r2.(x - a)^2 + (y - b)^2 = r^2.

Watch itpredict, then reveal

Example 38.2

AMC 10

A triangle with sides of 55, 1212, and 1313 has both an inscribed and a circumscribed circle. What is the distance between the centers of those circles?

Coordinate plane (its total is revealed at the end of the example)

Figure on the coordinate plane: C, B, A

  1. 1

    52+122=1325^2 + 12^2 = 13^2, so this is a right triangle. Put the right angle at the origin: C=(0,0)C = (0, 0), B=(12,0)B = (12, 0), A=(0,5)A = (0, 5). Where is the circumcenter OO of a right triangle?

    Predict first:
    Click a choice or type its letter (A–E).
open on YouTube

Example 38.5

PUMaC

Let ABCDABCD be a square with side length 88. Let MM be the midpoint of BCBC and let ω\omega be the circle passing through MM, AA, and DD. Let OO be the center of ω\omega, XX be the intersection point (besides AA) of ω\omega with ABAB, and YY be the intersection point of OXOX and AMAM. Find the length OYOY.

Coordinate plane (its total is revealed at the end of the example)

Figure on the coordinate plane: A, B, C, D, M

  1. 1

    Set A=(0,0)A = (0, 0), B=(8,0)B = (8, 0), C=(8,8)C = (8, 8), D=(0,8)D = (0, 8). Then M=(8,4)M = (8, 4). The center OO is equally far from AA and DD. Which line must it lie on?

open on YouTube

Contest cornerreal contest problems

Problem 38.5.6

AMC 10

The area of the region bounded by the graph of

x2+y2=3∣x−y∣+3∣x+y∣x^2 + y^2 = 3|x - y| + 3|x + y|

is m+nπm + n\pi, where mm and nn are integers. What is m+nm + n?

Problem 38.5.7

AMC 10

A circle of radius rr is surrounded by three circles, whose radii are 11, 22, and 33, all externally tangent to the inner circle and externally tangent to each other, as shown in the diagram below. What is rr?

Problem 38.5.13(additional)

AMC 10

Line segment AB‾\overline{AB} is a diameter of a circle with AB=24AB = 24. Point CC, not equal to AA or BB, lies on the circle. As point CC moves around the circle, the centroid (center of mass) of △ABC\triangle ABC traces out a closed curve missing two points. To the nearest positive integer, what is the area of the region bounded by this curve?

Problem 38.5.14(additional)

AMC 12

This problem also appears in the book as 34.5.33.

Right triangle ABCABC has side lengths BC=6BC = 6, AC=8AC = 8, and AB=10AB = 10. A circle centered at OO is tangent to line BCBC at BB and passes through AA. A circle centered at PP is tangent to line ACAC at AA and passes through BB. What is OPOP?

Checkpoint for section 38.2

Get 2 of 3 right to master this section. One try each, no hints.
1

What is the radius of the circle x2+y2−6x+4y−12=0x^2 + y^2 - 6x + 4y - 12 = 0?

2

A circle has center (2,−3)(2, -3) and passes through (−4,5)(-4, 5). Its equation is (x−2)2+(y+3)2=k(x - 2)^2 + (y + 3)^2 = k. What is kk?

3

A circle of radius rr is surrounded by three circles, whose radii are 11, 22, and 33, all externally tangent to the inner circle and externally tangent to each other, as shown in the diagram below. What is rr?

38.30%

Shoelace Theorem to Find Area

In this section you will be able to find the area of any polygon from its vertices with the shoelace formula.

List the corners, criss-cross multiply, halve the difference. That’s any polygon’s area in one table.

The shoelace formula needs only the coordinates of the vertices, in order around the polygon. Clockwise or counterclockwise doesn’t matter, since you take the absolute value at the end.

Look: you choose where the axes go. Put a right angle at the origin and many products in the table become 00.

Exploreplay first, formulas later

Polygon with 5 vertices: right-down products sum to 89, left-down products to 47; area = ½ × |89 − 47| = 21

ABCDE
#xy↘ x·y′↙ x′·y
A1117
B71427
C762124
D43243
E1616
A11Σ 89Σ 47
Area = ½ × |89 − 47| = 21
signed: 21 (counter-clockwise)

Polygon with 5 vertices: right-down products sum to 89, left-down products to 47; area = ½ × |89 − 47| = 21

Name it

Theorem 38.3.1 · Shoelace Theorem using coordinates

Suppose the polygon PP has vertices (a1,b1),(a2,b2),…,(an,bn)(a_1, b_1), (a_2, b_2), \ldots, (a_n, b_n), listed in clockwise order. Then the area AA of PP is

A=12∣(a1b2+a2b3+⋯+anb1)−(b1a2+b2a3+⋯+bna1)∣.A = \frac{1}{2}\left|(a_1 b_2 + a_2 b_3 + \cdots + a_n b_1) - (b_1 a_2 + b_2 a_3 + \cdots + b_n a_1)\right|.

You can also go in counterclockwise order, as long as you take the absolute value of the answer.

The Shoelace Theorem gets its name from the picture you get when you list the coordinates in a column, repeat the first pair at the bottom, and mark the pairs of coordinates to be multiplied: the criss-cross lines look like the laces of a shoe. (This is Theorem 30.1.12 again.)

Remark 38.3.2 · Intuitive Way of Thinking about Shoelace Theorem

Steps to the Shoelace Theorem:

  1. Line up all of your polygon's coordinates in a vertical column.
  2. Repeat your first coordinate at the bottom of the column.
  3. Let AA be the sum of the products of all the rightward (down-right) diagonal pairs.
  4. Let BB be the sum of the products of all the leftward (down-left) diagonal pairs.
  5. Find
12∣A−B∣.\frac{1}{2}|A - B|.

Watch itpredict, then reveal

Example 38.1

AMC 10

Let points A=(0,0)A = (0, 0), B=(1,2)B = (1, 2), C=(3,3)C = (3, 3), and D=(4,0)D = (4, 0). Quadrilateral ABCDABCD is cut into equal area pieces by a line passing through AA. This line intersects CD‾\overline{CD} at point (pq,rs)\left(\frac{p}{q}, \frac{r}{s}\right), where these fractions are in lowest terms. What is p+q+r+sp + q + r + s?

Shoelace lab (its total is revealed at the end of the example)

ABCD
#xy↘ x·y′↙ x′·y
A0000
B1236
C33012
D4000
A00Σ 3Σ 18
Area = ½ × |3 − 18| = ? (hidden until the end of the example)
signed: −7.5 (clockwise)

Polygon with 4 vertices: right-down products sum to 3, left-down products to 18; area = ½ × |3 − 18| = ?

  1. 1

    Start with the whole area. Use the shoelace formula on A,B,C,DA, B, C, D. What is [ABCD][ABCD]?

    Predict first:
open on YouTube

Example 38.4

AMC 10

In the right triangle △ACE\triangle ACE, we have AC=12AC = 12, CE=16CE = 16, and EA=20EA = 20. Points BB, DD, and FF are located on AC‾\overline{AC}, CE‾\overline{CE}, and EA‾\overline{EA}, respectively, so that AB=3AB = 3, CD=4CD = 4, and EF=5EF = 5. What is the ratio of the area of △DBF\triangle DBF to that of △ACE\triangle ACE?

Shoelace lab (its total is revealed at the end of the example)

24681012141624681012ACEDBF
#xy↘ x·y′↙ x′·y
D40360
B090108
F123012
D40Σ 36Σ 120
Area = ½ × |36 − 120| = ? (hidden until the end of the example)
signed: −42 (clockwise)

Polygon with 3 vertices: right-down products sum to 36, left-down products to 120; area = ½ × |36 − 120| = ?

  1. 1

    EA=20EA = 20 is the longest side, so the right angle is at CC. Put CC at the origin, AA on the yy-axis and EE on the xx-axis. What are their coordinates?

open on YouTube

Contest cornerreal contest problems

Problem 38.5.10(additional)

AMC 12

Triangle ABCABC has vertices A=(3,0)A = (3, 0), B=(0,3)B = (0, 3), and CC, where CC is on the line x+y=7x + y = 7. What is the area of △ABC\triangle ABC?

Problem 38.5.16(additional)

AMC 12

A triangle has vertices (0,0)(0, 0), (1,1)(1, 1), and (6m,0)(6m, 0), and the line y=mxy = mx divides the triangle into two triangles of equal area. What is the sum of all possible values of mm?

Problem 38.5.21(additional)

AIME

Consider the parallelogram with vertices (10,45)(10, 45), (10,114)(10, 114), (28,153)(28, 153), and (28,84)(28, 84). A line through the origin cuts this figure into two congruent polygons. The slope of the line is m/nm/n, where mm and nn are relatively prime positive integers. Find m+nm + n.

Polygon with 4 vertices: right-down products sum to 6282, left-down products to 8766; area = ½ × |6282 − 8766| = 1242

102030102030405060708090100110120130140150160PQRS
#xy↘ x·y′↙ x′·y
P10451140450
Q1011415303192
R2815323524284
S28841260840
P1045Σ 6282Σ 8766
Area = ½ × |6282 − 8766| = 1242
signed: −1242 (clockwise)

Polygon with 4 vertices: right-down products sum to 6282, left-down products to 8766; area = ½ × |6282 − 8766| = 1242

Problem 38.5.23(additional)

AIMEChallenge

Triangle ABCABC lies in the cartesian plane and has an area of 7070. The coordinates of BB and CC are (12,19)(12, 19) and (23,20)(23, 20), respectively, and the coordinates of AA are (p,q)(p, q). The line containing the median to side BC‾\overline{BC} has slope −5-5. Find the largest possible value of p+qp + q.

Checkpoint for section 38.3

Get 2 of 3 right to master this section. One try each, no hints.
1

Find the area of the triangle with vertices (1,2)(1, 2), (7,4)(7, 4) and (3,9)(3, 9).

2

Find the area of the quadrilateral with vertices (0,0)(0, 0), (5,1)(5, 1), (4,6)(4, 6), (−1,3)(-1, 3), in that order.

3

You run the shoelace formula on the same polygon twice: once with the vertices listed counterclockwise, once clockwise. What happens to 12(A−B)\frac12(A - B) before you take the absolute value?

Click a choice or type its letter (A–E).
38.40%

Pick's Theorem (Optional)

In this section you will be able to find the area of a lattice polygon by counting dots, and count dots from the area.

On a lattice, area is just counting dots: the dots inside, plus half the dots on the boundary, minus one.

Pick’s theorem works for any polygon whose corners are lattice points, convex or not. It also runs backwards. Know the area (from the shoelace formula) and the boundary count, and you know how many lattice points are inside.

Counting boundary points is quick: a side from (x1,y1)(x_1, y_1) to (x2,y2)(x_2, y_2) has gcd⁡(∣x2−x1∣,∣y2−y1∣)\gcd(|x_2 - x_1|, |y_2 - y_1|) lattice steps.

Exploreplay first, formulas later

Polygon with 5 vertices: right-down products sum to 84, left-down products to 39; area = ½ × |84 − 39| = 22.5. Pick: i = 18 interior and b = 11 boundary lattice points, i + b/2 − 1 = 22.5

ABCDE
i = 18 inside, b = 11 boundary: 18 + 5.5 − 1 = 22.5
signed: 22.5 (counter-clockwise) · Shoelace: 22.5

Polygon with 5 vertices: right-down products sum to 84, left-down products to 39; area = ½ × |84 − 39| = 22.5. Pick: i = 18 interior and b = 11 boundary lattice points, i + b/2 − 1 = 22.5

Name it

Theorem 38.4.1 · Pick's Theorem

If a polygon has vertices with integer coordinates (lattice points), then the area of the polygon is

i+b2−1,i + \frac{b}{2} - 1,

where ii is the number of lattice points inside the polygon and bb is the number of lattice points on the boundary of the polygon. (This is Theorem 30.1.14 again.)

Contest cornerreal contest problems

Problem 38.5.19(additional)

AIME

Find the area of the region enclosed by the graph of ∣x−60∣+∣y∣=∣x4∣|x - 60| + |y| = \left|\frac{x}{4}\right|.

Problem 38.5.20(additional)

AIME

Find the number of ordered pairs (x,y)(x, y) of positive integers that satisfy x≤2y≤60x \le 2y \le 60 and y≤2x≤60y \le 2x \le 60.

Checkpoint for section 38.4

Get 2 of 3 right to master this section. One try each, no hints.
1

A lattice polygon has 1010 lattice points inside it and 88 on its boundary. What is its area?

2

How many lattice points lie strictly inside the triangle with vertices (0,0)(0, 0), (4,0)(4, 0), (0,4)(0, 4)?

3

A lattice polygon has area 2020 and 1414 lattice points on its boundary. How many lattice points are inside it?

38.5

Practice Problems

In this section you will be able to mix every coordinate tool of the chapter on contest problems.

The rest of the practice set, from a quick 3-D warm-up to two AIME problems. Ask first: where should the axes go?

Want every problem from this chapter on one page? Open the problem set.

Contest cornerreal contest problems

Problem 38.5.1

AMC 10

The interior of a quadrilateral is bounded by the graphs of (x+ay)2=4a2(x + ay)^2 = 4a^2 and (ax−y)2=a2(ax - y)^2 = a^2, where aa is a positive real number. What is the area of this region in terms of aa, valid for all a>0a > 0?

Problem 38.5.5

AMC 10

What is the length of the boundary of the region in the xyxy-plane consisting of points of the form (2u−3w,v+4w)(2u - 3w, v + 4w) with 0≤u≤10 \le u \le 1, 0≤v≤10 \le v \le 1, and 0≤w≤10 \le w \le 1?

Problem 38.5.8

AIMEChallenge

Let ABCDABCD be a rhombus whose vertices all lie on the hyperbola x220−y224=1\frac{x^2}{20} - \frac{y^2}{24} = 1 and are in that order. If its diagonals intersect at the origin, find the largest number less than BD2BD^2 for all rhombuses ABCDABCD.

Problem 38.5.12(additional)

AMC 12

The point P=(1,2,3)P = (1, 2, 3) is reflected in the xyxy-plane, then its image QQ is rotated by 180∘180^\circ about the xx-axis to produce RR, and finally, RR is translated by 55 units in the positive-yy direction to produce SS. What are the coordinates of SS?

Problem 38.5.17(additional)

AMC 12

Let AA, BB and CC be three distinct points on the graph of y=x2y = x^2 such that line ABAB is parallel to the xx-axis and △ABC\triangle ABC is a right triangle with area 20082008. What is the sum of the digits of the yy-coordinate of CC?

Problem 38.5.18(additional)

AMC 10

In rectangle ABCDABCD, we have A=(6,−22)A = (6, -22), B=(2006,178)B = (2006, 178), D=(8,y)D = (8, y), for some integer yy. What is the area of rectangle ABCDABCD?

Problem 38.5.22(additional)

AIME

Let LL be the line with slope 512\frac{5}{12} that contains the point A=(24,−1)A = (24, -1), and let MM be the line perpendicular to line LL that contains the point B=(5,6)B = (5, 6). The original coordinate axes are erased, and line LL is made the xx-axis and line MM the yy-axis. In the new coordinate system, point AA is on the positive xx-axis, and point BB is on the positive yy-axis. The point PP with coordinates (−14,27)(-14, 27) in the original system has coordinates (α,β)(\alpha, \beta) in the new coordinate system. Find α+β\alpha + \beta.

Problem 38.5.24(additional)

AMC 10

This problem also appears in the book as 32.2.30.

In rectangle ABCDABCD, we have AB=8AB = 8, BC=9BC = 9, HH is on BC‾\overline{BC} with BH=6BH = 6, EE is on ADAD with DE=4DE = 4, line ECEC intersects line AHAH at GG, and FF is on line ADAD with GF‾⊥AF‾\overline{GF} \perp \overline{AF}. Find the length GFGF.