GeoCSS · LAB 04 · 8.G.A.1 · 8.G.A.3 · 8.G.B.8
Translations and the Distance Formula Lab: Answer Key
This key is public so any teacher can use it without an account. Students can find it too; the worksheet asks for reasoning, which a copied number does not supply.
Open the lab at geocss.com/labs/translations-distance-formula/. In the lab, the square is 60 px by 60 px and each grid square is 20 px. translate(x, y) moves it x px right and y px down.
1 · Predict (before you touch the lab)
Where will translate(60px, 80px) move the square?
Answer: 60 px right and 80 px down (on screen, positive y points down).
How far will the square’s center move in a straight line?
Answer: 100 px, because √(60² + 80²) = 100.
Will the square’s area change after the move?
Answer: No. A translation is a rigid motion; the area stays 3,600 px².
2 · Test in the lab
Set each movement in the lab. Record the straight-line distance (to two decimal places) and sketch the right triangle.
| Movement (x, y) px | Leg lengths | Distance √(x² + y²) (px) |
|---|---|---|
| (30, 40) | 30 and 40 | 50 |
| (−60, 80) | 60 and 80 | 100 |
| (80, −60) | 80 and 60 | 100 |
| (40, 40) | 40 and 40 | 56.57 |
3 · Explain
Explain how √(x² + y²) is the Pythagorean theorem.
Answer: The horizontal move and vertical move are the two legs of a right triangle. The straight-line move is the hypotenuse, so c² = x² + y² and c = √(x² + y²).
Why do (−60, 80) and (80, −60) give the same distance?
Answer: Both have legs of 60 and 80. Squaring removes the sign, and the order of the legs doesn’t matter: √(3,600 + 6,400) = 100.
Write the CSS that moves the square 50 px left and 20 px up.
Answer: transform: translate(-50px, -20px);
4 · Exit ticket
A point is translated by (−30, −40). How far did it move? Show your work.
Answer: √((−30)² + (−40)²) = √(900 + 1,600) = √2,500 = 50 units.
Lab challenges
The shortest way from A to B. Move 60 px right and 80 px down. What is the straight-line distance between the starting and ending centers?
Answer: By the Pythagorean theorem, √(60² + 80²) = √10,000 = 100 px. The translation preserves the square’s size.
Left and down. Set translate(-30px, 40px). How far does the square’s center move in a straight line, in px?
Answer: The legs are 30 and 40 (direction does not change length): √(30² + 40²) = √2,500 = 50 px.
Up is negative. On a math-class graph, moving up 40 means y increases by 40. What y value goes in CSS translate() to move the square up 40 px?
Answer: Screen y points down, so moving up 40 px is translate(0px, -40px). The y value is −40.