Skip to content
Tutorials Center
My learning

Topics

Lesson 4 of 37 · Getting Started

Reading Diagrams and Drawing with Code

Learn the marks used in geometry diagrams (ticks, arcs, arrows, right-angle boxes) and how to compute and plot points, midpoints and slopes in Python.

A geometry diagram is a compressed sentence. A few little marks tell you which sides are equal, which angles are right angles and which lines never meet. If you can read these marks, you can read almost any problem. In this lesson you will learn the marking conventions and then build a small toolbox of functions you will reuse throughout the course.

The language of diagram marks

Mark Meaning
One small tick across two segments Those segments have equal length
Two ticks on another pair A second pair of equal lengths (so one tick and two ticks are different pairs)
A small square in a corner The angle is exactly 90°
One arc inside two angles Those angles are equal
Two arcs inside another pair A second pair of equal angles
Arrowheads on two lines (> or >>) The lines are parallel
A letter like x An unknown length or angle to find
A line with a number The length of that segment

Diagrams are not to scale unless a problem says they are. Never measure a length or angle with a ruler or protractor to answer a "find" question. Use only what the marks and the text tell you.

Naming conventions

  • Points use capital letters: A, B, C.
  • The line segment from A to B is written AB; the length of it is also often written AB.
  • The angle with vertex B and sides toward A and C is written ∠ABC (the vertex letter is always in the middle). A single letter, ∠B, is fine when there is no confusion.
  • A triangle is written △ABC.
  • The symbol ∥ means parallel and ⊥ means perpendicular.
  • The symbol ≅ means congruent (identical shape and size), and ~ means similar.

A toolbox in Python

Coordinates let us turn a drawing into numbers. A point is a pair (x, y). With three small functions you can already answer many questions.

  • Distance between two points: √((x₂ - x₁)² + (y₂ - y₁)²).
  • Midpoint: the point halfway along: ((x₁ + x₂)/2, (y₁ + y₂)/2).
  • Slope: how steep: (y₂ - y₁)/(x₂ - x₁) (undefined if the segment is vertical).
Python Distance, midpoint and slope

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The last two lines show something worth remembering: a midpoint cuts a segment into two equal halves, and a vertical line has no slope.

Drawing a labeled figure

A picture helps you check your thinking. The program below uses matplotlib, a plotting library that is available in the in-browser Python on this site. It draws a triangle, labels the vertices and keeps the axes equal so that squares look square.

Python Draw a labeled triangle

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Try editing a coordinate and re-running. The set_aspect("equal") line matters: without it, a drawing can stretch, and angles will not look right.

From a diagram to a plan

When you meet a geometry problem, follow a routine:

  1. Redraw the diagram large and neat.
  2. Mark everything given: equal sides, right angles, parallel lines, measurements.
  3. Name the unknown (x) on the diagram.
  4. Choose a fact that links what you know to what you want.
  5. Check that your answer is reasonable (a side cannot be negative; an angle in a triangle cannot be 200°).
flowchart LR
    A["Redraw"] --> B["Mark given facts"]
    B --> C["Name the unknown"]
    C --> D["Choose a fact or formula"]
    D --> E["Solve"]
    E --> F["Check the answer"]

A routine that works for nearly every geometry problem.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. What does a small square drawn in the corner of an angle mean?

    A small square marks a right angle, which measures exactly 90°.
  2. 2. In ∠ABC, which letter is the vertex?

    The vertex letter always goes in the middle of the three-letter name.
  3. 3. What is the midpoint of the segment from (2, 4) to (8, 10)?

    Average the coordinates: (2 + 8)/2 = 5 and (4 + 10)/2 = 7.
  4. 4. A diagram is not drawn to scale. How should you find a missing angle?

    Without a to-scale claim, only the marks and numbers given are reliable.

Summary

  • Tick marks show equal lengths, arcs show equal angles, a small square shows 90°, arrowheads show parallel lines.
  • Diagrams are not to scale unless stated, so never rely on measuring them.
  • AB is a segment, ∠ABC has its vertex in the middle, ∥ is parallel, ⊥ is perpendicular, ≅ is congruent.
  • Distance, midpoint and slope turn a diagram into numbers you can compute.
  • Follow the routine: redraw, mark, name the unknown, choose a fact, solve, check.

Next: Points, Lines and Planes