On a route profile, how can you tell which Irish Rail stretch is steeper?
On an Irish Rail route profile, one stretch gains a little height over a short horizontal distance. Another gains more height over a much greater horizontal distance. Which is steeper? To decide, compare how much height each stretch gains for the same horizontal distance.
Start at A. Follow the first leg to the right. Your x co-ordinate changes, but your y co-ordinate stays the same. Now follow the second leg up to B. Only your y co-ordinate changes. The two legs meet at a right angle.
Join A to B. To get from A to B along the two legs, move four units right, then two units up. The horizontal change is the run and the vertical change is the rise. Divide the rise by the run: two over four gives a slope of one half.
On a new grid, you go from P to Q by moving six units right and three units down. The horizontal change is positive. Think about the sign of the vertical change, then pick the slope.
Take A at two, seven and B at five, one. Going from A to B, subtract A's y and x values from B's. Negative six over three gives negative two. Going back, reverse both subtractions. You get six over negative three, which is still negative two.
C is at one, six, and D is at five, three. Start at D this time, so subtract D's co-ordinates from C's. Work out the change in y and the change in x in that order, then pick the slope.
Follow each line two units to the right. Both rise by one unit, so both slopes are one half. The lines are in different positions, but they have the same steepness and direction. Distinct lines with equal finite slopes are parallel.
The first line rises one for every two units right. The second drops two for every unit right. They meet at a right angle. One half times negative two is negative one. When both slopes are defined, the lines are perpendicular exactly when their slopes multiply to negative one.
Check for horizontal or vertical lines first. A horizontal line has zero rise, so its slope is zero. A vertical line has zero run, so its slope is undefined. Distinct horizontal lines are parallel, as are distinct vertical lines. A horizontal line and a vertical line are perpendicular.
To show that A B is perpendicular to C D, calculate both slopes. For A B, divide five minus one by three minus one to get two. For C D, divide three minus five by five minus one to get negative one half. Their product is negative one, so the lines are perpendicular.