Overview (what you'll learn)
You'll understand the Pythagorean theorem (why it works and how to use it), get the algebra skills you need from AoPS Pre-Algebra and Intro to Algebra, and build a hands-on LEGO Education Spike Prime project that measures and computes distances with the theorem. I'll give step-by-step activities, sample code, practice problems with answers, and a fun note about using Wobbledogs as a creative break.
1) The Pythagorean theorem — simple explanation
In a right triangle (one angle 90°), label the two shorter sides a and b (legs), and the longest side c (hypotenuse). The Pythagorean theorem states:
c² = a² + b²
That means the square of the hypotenuse equals the sum of the squares of the other two sides. To find c, take the square root: c = √(a² + b²). To find a when you know b and c: a = √(c² − b²).
Short geometric idea of why it works
- One visual proof: build a square with side (a+b) and divide it so you see four copies of the right triangle inside. Counting area two different ways gives the formula c² = a² + b².
- Algebraic manipulations are the same idea: use areas to create an equation, rearrange, and you get the theorem.
2) Algebra skills you should review (AoPS Pre-Algebra & AoPS Intro to Algebra)
- From AoPS Pre-Algebra: arithmetic with integers, exponents (squares), basic manipulation of expressions — e.g., compute a², b² and add them.
- From AoPS Intro to Algebra: solving simple equations, isolating a variable, understanding radicals and square roots (√), and simplification. Those let you solve for an unknown leg or the hypotenuse.
- Practice goals: comfortably compute squares and square roots, rearrange equations to solve for a variable, and simplify numeric radicals (like √50 = 5√2 if needed).
3) Hands-on Spike Prime project — "Right Triangle Navigator"
Goal: Use Spike Prime (hub + distance sensor or ultrasonic sensor) to measure two perpendicular legs and compute the hypotenuse in code. Then use the robot to navigate by computing needed distances.
Materials
- LEGO Education Spike Prime set (hub, motors, distance sensor or ultrasonic sensor)
- Flat floor space and tape to mark a right angle (or use walls forming a corner)
- Computer or tablet with Spike Prime app (Scratch-based or MicroPython)
Design idea
- Place the robot at the right-angle corner facing along side a.
- Measure forward distance a using the distance sensor (or by driving known counts and recording encoder distance).
- Rotate 90° to face along side b and measure b.
- Compute c = sqrt(a*a + b*b) in code and display/print it. Optionally drive along the computed diagonal to verify.
MicroPython sample code (Spike Prime hub)
from math import sqrt
from spike import PrimeHub, DistanceSensor, Motor
hub = PrimeHub()
sensor = DistanceSensor('A') # change port if needed
# Example: measured values in centimeters (replace with sensor reads)
a = 30.0
b = 40.0
c = sqrt(a*a + b*b)
hub.speaker.beep()
hub.display.scroll('hypo = {:.2f} cm'.format(c))
print('Hypotenuse =', c)
To use live readings, replace a and b with sensor.get_distance() or encoder-based measurements. If using encoder distances, convert wheel rotations to centimeters first.
Testing and calibration
- Calibrate the distance sensor by comparing sensor readings to a ruler at several distances and adjust offsets if needed.
- To test the result: tape a diagonal line of length equal to computed c and have the robot follow it, or simply measure the diagonal with a tape measure and compare.
4) Step-by-step lesson plan (90–120 minutes)
- (15 min) Quick algebra warm-up from AoPS Pre-Algebra: squares and square roots practice (5–10 problems).
- (15 min) Teach Pythagorean theorem visually: draw triangles, show area proof, solve 3–4 manual examples (3-4-5, 5-12-13).
- (30–45 min) Build Spike Prime setup and write simple code to read distances (or use encoder distances). Test sensor reads and calibrate.
- (20–30 min) Implement c = sqrt(a^2 + b^2) and test by measuring two sides and comparing to a tape measure diagonal. If time, drive along diagonal and observe error sources.
- (5–10 min) Reflect and extension: change one side and re-run; ask how errors propagate (sensor noise, wheel slippage).
5) Practice problems (with answers)
- Easy: a = 3, b = 4. Find c. Answer: c = 5.
- Medium: c = 13, a = 5. Find b. Answer: b = sqrt(13^2 − 5^2) = sqrt(169 − 25) = sqrt(144) = 12.
- Realistic robotics: robot measured a = 37.2 cm, b = 24.8 cm. Compute c. Answer: c = sqrt(37.2^2 + 24.8^2) ≈ sqrt(1383.84 + 615.04) = sqrt(1998.88) ≈ 44.71 cm.
- Challenge: Show whether a triangle with sides 8, 15, 17 is right. Answer: 17^2 = 289, 8^2 + 15^2 = 64 + 225 = 289 → yes, right triangle.
6) Extensions & connections to AoPS topics
- Use AoPS Intro to Algebra to practice algebraic rearrangements: solve (x+1)^2 + (2x−3)^2 = 100 for x (leads to quadratic work).
- Apply the theorem to coordinate geometry: distance between (x1,y1) and (x2,y2) is sqrt((x2−x1)^2 + (y2−y1)^2) — this comes directly from Pythagoras.
- Explore 3D: in a rectangular box, diagonal length uses c² = a² + b² + d² (useful if you want to navigate in 3D planning).
7) Using Wobbledogs (fun + intuition)
Wobbledogs is a fun creative game with physics-like behavior. Use it as a short reward between blocks of study. Also, observe how shapes and joints affect motion — this builds geometric intuition. For example, notice how changing a "leg" length changes stride, which is a practical, visual way to understand how changing a side length affects distances.
8) Troubleshooting & tips
- If sensor readings are noisy, average several readings before computing the hypotenuse.
- When driving to follow the diagonal, wheel slip and small angle errors cause drift; consider closed-loop control or use encoders plus gyro for better heading.
- If square roots are messy, you can keep answers as radicals (√) or approximate to 2 decimals for robotics.
Final notes
This plan mixes the theoretical (Pythagorean theorem), the algebra practice from AoPS courses (Pre-Algebra & Intro to Algebra), and a hands-on Spike Prime robotics project that makes math tangible. Use Wobbledogs for creative breaks and intuition-building. If you want, I can give: 1) a printable worksheet of practice problems tailored to AoPS levels, 2) a step-by-step Spike Prime build and exact port/code for your hub model, or 3) extended challenge problems that combine algebra and geometry. Which would you like next?