TExcelTAD
Home › Pre-Calculus, Geometry & Trigonometry › Pre-Calculus Intro

Pre-Calculus Intro

Pre-calculus is the toolbox you need before calculus: shapes and measurements, angles and trigonometry, functions, sequences and series, and a first idea of limits. This course covers all of it, checks every idea in Python, and shows where programmers meet each topic in games, graphics, maps and data.

Where this course sits

The Mathematics track is a ladder. Each course assumes the one before it:

Step Course What it gives you
1 Basic Math & Pre-Algebra numbers, fractions, percents, exponents, the coordinate plane
2 Algebra equations, polynomials, factoring, systems, graphing lines and parabolas
3 Pre-Calculus, Geometry & Trigonometry (this course) shapes, proofs, trig, function families, series, conics, first limits
4 Calculus Essentials derivatives and integrals, a gentle survey
5 Calculus in Depth and Linear Algebra the full university treatment

If you can solve a linear equation, factor a simple quadratic and plot a point (3,−2)(3, -2), you are ready.

What is in the course

The topic order follows Debra Anne Ross, Master Math: Pre-Calculus and Geometry, used only as a reference for the order of topics. All text, examples and exercises here are original. The book's chapters map onto the course like this, with a few extra parts added to fill common gaps:

Part Topics Source of the order
Geometry lines, angles, polygons, triangles, circles, area, volume, vectors book chapter 1
Geometry extras congruence, two-column proofs, transformations, coordinate geometry added
Trigonometry radians, the six functions, the unit circle, identities, laws of sines and cosines, graphs, inverses book chapter 2
Sets and Functions sets, functions, composition and inverses, polynomial, rational, exponential and piecewise functions book chapter 3
Sequences, Progressions and Series arithmetic and geometric progressions, series, convergence, power series, binomial expansion, induction book chapter 4
Conics, Polar and Complex conic sections, polar and parametric forms, complex numbers in polar form added
Limits and a First Look at Calculus limits, continuity, a preview of the derivative and the integral book chapters 5 to 7
Geometry and Trig in Computing collision tests, aiming, procedural meshes, waves, map distances, convex hulls added

A first taste: distance and direction

A game character stands at (1,2)(1, 2) and an enemy at (7,10)(7, 10). How far away is the enemy, and in which direction should the character turn? The distance comes from the Pythagorean theorem and the direction from trigonometry:

python · try it yourself
import math

px, py = 1, 2        # player
ex, ey = 7, 10       # enemy
dx, dy = ex - px, ey - py

distance = math.hypot(dx, dy)                 # √(dx² + dy²)
heading = math.degrees(math.atan2(dy, dx))    # angle from the +x axis
print("offset:", (dx, dy))
print("distance:", distance)
print(f"heading: {heading:.2f}°")
offset: (6, 8)
distance: 10.0
heading: 53.13°

The offset (6,8)(6, 8) is the hypotenuse of a 6-8-10 right triangle, so the distance is exactly 10. The heading uses atan2, which you will meet in Geometry and Trig with Python and again in Inverse Trigonometric Functions.

A first taste: area from corners

Given only the corners of a shape, you can find its area with a short formula that walks around the outline. Here it is on a right triangle whose area you can check by hand (12×4×3=6\frac{1}{2} \times 4 \times 3 = 6):

python · try it yourself
def shoelace(points):
    s = 0
    n = len(points)
    for i in range(n):
        x1, y1 = points[i]
        x2, y2 = points[(i + 1) % n]
        s += x1 * y2 - x2 * y1
    return abs(s) / 2

print(shoelace([(0, 0), (4, 0), (4, 3)]))
print(shoelace([(0, 0), (5, 0), (5, 2), (2, 2), (2, 4), (0, 4)]))   # an L shape
6.0
14.0

The L shape is a 5×25 \times 2 rectangle plus a 2×22 \times 2 square, 10+4=1410 + 4 = 14. Games, map software and CAD programs use this shoelace formula all the time. It is explained in Polygons.

Why programmers need this

Topic Where it shows up in code
Distance, midpoint, slope movement, AI ranges, camera framing, snapping in drawing tools
Polygons and areas hit testing, map regions, layout engines, CAD
Similar triangles perspective cameras and 3D rendering
Transformations every sprite or model is translated, rotated and scaled by a matrix
Trigonometry aiming, circular motion, rotation, sound and signal waves
Series how sin, exp and log are actually computed in a math library
Limits the idea behind derivatives, gradients and machine-learning training

Learning paths

Your goal Suggested route
Full high-school course every lesson in order, then Exercises and the Mini Project
Game and graphics developer Geometry part, then Translations, Reflections and Rotations, the Trigonometry part, then Geometry and Trig in Computing; continue with Game Math
Heading to calculus quickly Trigonometry, Sets and Functions, Sequences and Series, then Limits; continue with Calculus Essentials
Data and machine learning coordinate geometry, vectors, functions, exponential and log functions, series; continue with Linear Algebra

Tip: Run every example, then change a number and predict the new output before you run it again. That habit is the fastest way to build intuition.

How each lesson works

Each lesson explains one idea, gives runnable Python examples, and ends with exercises (answers and full solutions are hidden until you open them) and a short quiz. Formulas are typeset in math notation, such as A=πr2A = \pi r^2 and c2=a2+b2c^2 = a^2 + b^2; the Python examples write the same formulas as code (math.pi * r**2).

Exercises

Exercise 1: Distance by hand

How far apart are the points (−2,1)(-2, 1) and (3,13)(3, 13)?

Answer

13

Solution
dx=3−(−2)=5,dy=13−1=12d=52+122=25+144=169=13\begin{aligned} dx &= 3 - (-2) = 5, \qquad dy = 13 - 1 = 12 \\ d &= \sqrt{5^2 + 12^2} = \sqrt{25 + 144} = \sqrt{169} = 13 \end{aligned}

Exercise 2: A rectangle by shoelace

Use the shoelace function above (or work it by hand) on the rectangle with corners (1,1)(1, 1), (6,1)(6, 1), (6,4)(6, 4), (1,4)(1, 4). Check that it matches width×height\text{width} \times \text{height}.

Answer

1515, which equals 5×35 \times 3.

Solution
python · try it yourself
def shoelace(points):
    s = 0
    for i in range(len(points)):
        x1, y1 = points[i]
        x2, y2 = points[(i + 1) % len(points)]
        s += x1 * y2 - x2 * y1
    return abs(s) / 2

print(shoelace([(1, 1), (6, 1), (6, 4), (1, 4)]))
15.0

Exercise 3: Which heading?

Without running code, in which direction (in degrees from the +x axis) does the offset (0,−5)(0, -5) point? Then check with math.degrees(math.atan2(-5, 0)).

Answer

−90∘-90^\circ (straight down; the same direction as 270°).

Solution

The offset has no x part and a negative y part, so it points along the negative y axis. atan2 returns angles between −180° and 180°, so it reports −90°, which is the same direction as 270°.

python · try it yourself
import math
print(math.degrees(math.atan2(-5, 0)))
-90.0

Test yourself

Which course comes directly before Pre-Calculus on the Mathematics ladder?

  1. Calculus Essentials
  2. Algebra
  3. Linear Algebra
  4. Statistics

What is the distance from (1,2)(1, 2) to (7,10)(7, 10)?

  1. 14
  2. 28\sqrt{28}
  3. 10
  4. 8

What does the shoelace formula compute?

  1. The area of a polygon from its corner coordinates
  2. The perimeter of a circle
  3. The angle between two lines
  4. The length of a diagonal