Recognizing a proportional relationship in a graph
A graph shows how far a cyclist has gone after each hour. How can you tell from the picture alone whether the distance is proportional to the time?
Where you are 4 in Proportional relationships
When you reach for it
A table of a journey makes you divide every pair of numbers to see whether one ratio holds. A graph lets you see the answer. Reach for this skill whenever two quantities are drawn against each other on the coordinate plane and the question is whether one is a fixed multiple of the other: whether distance is proportional to time, as it is for anything moving at a steady speed, or whether something (a head start, a stop, speeding up) has broken the pattern.
The test is short. The graph of a proportional relationship is a straight line through the origin, and every straight line through the origin, other than the two axes themselves, is the graph of a proportional relationship. Both halves of the test matter: a straight line that misses the origin is not proportional, and neither is a curve that passes through it.
A graph that passes also hands over the constant of proportionality: it is the height of the line one unit to the right of the origin. The lesson runs over two days. Part 1 is the test and why it works; Part 2 is reading a proportional graph.
The procedure
Part 1: the test, and why it works
Throughout, x is the quantity on the horizontal axis and y the one on the vertical axis. For motion, x is usually the time and y the distance traveled. Recall that y is proportional to x when there is one number k with
for every pair of values, so that every non-zero x gives the same ratio \displaystyle \frac{y}{x} = k. The lesson on the constant of proportionality covers this, and how to spot it in a table.
Why the graph goes through the origin. Put x = 0 into y = kx and you get y = k \cdot 0 = 0, whatever k is. So (0, 0) is always one of the points. For a journey this says something plain: in no time at all, no distance has been covered. A graph that crosses the vertical axis anywhere else, say at (0, 2), has y = 2 when x = 0, and no multiple of 0 is 2.
Why the graph is straight. Move one unit to the right, from any x to x + 1. Then y goes from kx to k(x + 1) = kx + k, by the distributive property. So every step of 1 across is matched by a step of exactly k up, wherever along the graph you are. The points climb like a staircase with identical steps, and the corners of the staircase line up. Half a step across gives half of k up and a tenth of a step gives a tenth of k, so the points in between lie on the same line. A graph that climbs by the same amount for every equal step across never bends.
Why every straight line through the origin is proportional. Run the staircase backwards. A straight line has the same steepness all along it, so every step of 1 across climbs the same amount; call that amount k. The line starts at height 0 at the origin, so after x steps across it has climbed x lots of k, fractions of a step included: y = kx at every point. That one number k is the constant of proportionality. Why a straight line has the same steepness everywhere is proved later with slope triangles.
So the test has two parts, and a graph must pass both:
- it is a straight line, or its points all lie on one, and
- the line passes through the origin, (0, 0).
Graph A passes both. Graph B is straight but crosses the vertical axis above the origin: the traveler was already some distance along when the clock started, so the distance was never a fixed multiple of the time. Graph C starts at the origin but curves upward: it covers more distance in each second than in the one before, so it is speeding up, and the ratio \displaystyle \frac{y}{x} grows as you go.
When the graph comes as numbers (a table or a list of points) rather than a drawing, no plotting is needed. The points lie on one line through the origin exactly when \displaystyle \frac{y}{x} is the same for every point with x \ne 0, and any point on the vertical axis is (0, 0) itself. A picture can mislead by a hair, as Example 2 shows; the division cannot.
Examples 1 to 3 practice this part.
Part 2: reading a proportional graph
Once a graph is known to be proportional, every point on it says the same thing at a different size.
A point is a pair of matched values. On a graph of distance in kilometers against time in hours, the point (2, 30) says: after 2 hours, 30 km have been covered. Its ratio \displaystyle \frac{30}{2} = 15 is the speed, 15 km per hour.
The point (1, k) sits one unit to the right of the origin, and its height is k \cdot 1 = k. So the constant of proportionality can be read straight off the graph as the height of the line above x = 1. It is the unit rate: the distance for one hour, which is the speed. If the line does not cross x = 1 at a readable height, choose any point (x, y) where it crosses the grid exactly and divide: \displaystyle k = \frac{y}{x}. Every point gives the same answer, which is what Part 1 proved.
Steeper means a larger constant. Two proportional lines on the same axes both start at the origin, so they differ only in how fast they climb. Above x = 1, the line with the larger k is higher, and it stays higher everywhere to the right. For journeys, the steeper line belongs to the faster traveler. This steepness is the line’s Slope, and for a line through the origin the slope is k.
Swapping the axes turns the constant upside down. If time is drawn up the side and distance along the bottom, the graph is still a straight line through the origin, so still proportional, but its constant is now time per unit of distance (minutes per kilometer, say). The two constants are reciprocals, since y = kx means \displaystyle x = \frac{1}{k}y.
Examples 4 to 7 practice this part.
Worked examples
Two tables, two graphs
Plot each table, and decide whether the second quantity is proportional to the first. Where it is, give the constant of proportionality.
(a) A train leaving a station.
| Time (minutes) | 0 | 2 | 4 | 6 |
|---|---|---|---|---|
| Distance traveled (km) | 0 | 3 | 6 | 9 |
(b) Asha walks along a trail, setting off from a hut that is 2 km from the trailhead.
| Time (hours) | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| Distance from the trailhead (km) | 2 | 6 | 10 | 14 |
(a) The points (0, 0), (2, 3), (4, 6) and (6, 9) lie on one straight line through the origin: each 2 minutes across adds 3 km up. So distance is proportional to time. Every point with x \ne 0 gives the same ratio, \displaystyle \frac{3}{2} = \frac{6}{4} = \frac{9}{6} = 1.5, so k = 1.5: the train covers 1.5 km each minute.
(b) The points (0, 2), (1, 6), (2, 10) and (3, 14) lie on a straight line, since each hour adds 4 km. But the line crosses the vertical axis at (0, 2), not at the origin, so distance from the trailhead is not proportional to time. The ratios confirm it: \displaystyle \frac{6}{1} = 6, \displaystyle \frac{10}{2} = 5 and \displaystyle \frac{14}{3} \approx 4.67 are all different.
Asha does walk at a steady 4 km per hour; the head start is what breaks the pattern. Measure instead the distance she has walked since leaving the hut, 0, 4, 8 and 12 km, and the graph moves down 2 units to pass through the origin, with k = 4. Whether a graph is proportional depends on exactly what is measured.
Points that look as if they are on the line
A canal boat’s log gives its distance in kilometers after a number of hours, as points (\text{time}, \text{distance}). Decide in each case whether distance is proportional to time.
(a) (2, 7), (4, 14), (6, 21), (10, 35)
(b) A second boat: (1, 3), (2, 6), (3, 8), (4, 12)
SolutionDivide each distance by its time.
(a) \displaystyle \frac{7}{2} = 3.5, \displaystyle \frac{14}{4} = 3.5, \displaystyle \frac{21}{6} = 3.5 and \displaystyle \frac{35}{10} = 3.5. One ratio for every point, so all four lie on the line y = 3.5x through the origin. Proportional, with k = 3.5 km per hour.
(b) \displaystyle \frac{3}{1} = 3, \displaystyle \frac{6}{2} = 3, \displaystyle \frac{8}{3} \approx 2.67 and \displaystyle \frac{12}{4} = 3. Three of the points sit on y = 3x, but (3, 8) is one unit below where that line passes, at (3, 9). The points do not all lie on one line, so this log is not proportional. The boat covered only 2 km in the third hour and made up for it with 4 km in the fourth. On a small graph (3, 8) would look almost on the line; the ratios settle what the eye cannot.
Through the origin, and still not proportional
Decide whether each graph shows a proportional relationship.
(a) A cyclist rolls from rest down a hill. Her distance in meters after a number of seconds gives the points (0, 0), (1, 1), (2, 4), (3, 9) and (4, 16), joined by a smooth curve.
(b) Ben walks for 1 hour at 4 km per hour, rests for half an hour, then walks for another hour at the same speed. His graph joins (0, 0), (1, 4), (1.5, 4) and (2.5, 8) with straight pieces.
SolutionBoth graphs start at the origin, so the question is the other half of the test: is it one straight line?
(a) No. The distances gained in the four seconds are 1, 3, 5 and 7 meters. The steps up are not equal, so the graph bends upward, and the ratios \displaystyle \frac{1}{1} = 1, \displaystyle \frac{4}{2} = 2, \displaystyle \frac{9}{3} = 3 and \displaystyle \frac{16}{4} = 4 keep growing. She is speeding up, and a changing speed is not a constant of proportionality.
(b) No. The first piece, from (0, 0) to (1, 4), lies on y = 4x. The flat piece is the rest: time passes and the distance stays at 4. The last piece climbs at the old speed, but along y = 4x moved half an hour to the right, y = 4x - 2, and it ends at (2.5, 8), where \displaystyle \frac{8}{2.5} = 3.2, not 4. The whole graph is not one line, so the whole walk is not proportional. The first hour on its own is.
Reading a cyclist’s graph
The graph shows a cyclist’s distance d, in kilometers, after t hours. It is a straight line through the origin and the point (2, 30).
(a) Explain why the distance is proportional to the time, and what the point (2, 30) means.
(b) Find the constant of proportionality, and say where it shows on the graph.
(c) How far has the cyclist gone after 3.5 hours?
(d) How long does she take to cover 45 km?
Solution(a) The graph is a straight line and it passes through the origin, so it passes both halves of the test. The point (2, 30) means that after 2 hours she has covered 30 km.
(b) \displaystyle k = \frac{30}{2} = 15. It shows as the point (1, 15): after one hour, 15 km. The constant is her speed, 15 km per hour, and the relationship is d = 15t.
(c) d = 15 \times 3.5 = 52.5, so she has gone 52.5 km. On the graph, that is the height of the line above t = 3.5.
(d) Each hour gives 15 km, so 45 km takes \displaystyle \frac{45}{15} = 3 hours. The line reaches height 45 above t = 3.
Two trains on the same axes
Two trains leave the same station at the same moment on parallel tracks. The graph shows the distance of each, in kilometers, against time in hours. The passenger train’s line passes through (2, 160) and the freight train’s line through (4, 200).
(a) Which train is faster, and by how much?
(b) How far apart are they after 3 hours?
(c) The next city is 400 km away. How much sooner does the passenger train get there?
Solution(a) Both lines are straight and pass through the origin, so each distance is proportional to time. For the passenger train \displaystyle k = \frac{160}{2} = 80, and for the freight train \displaystyle k = \frac{200}{4} = 50. The passenger train is faster, by 80 - 50 = 30 km per hour. The picture shows which is faster before any division: its line is the steeper one.
(b) After 3 hours the passenger train has gone 80 \times 3 = 240 km and the freight train 50 \times 3 = 150 km, so they are 240 - 150 = 90 km apart. The gap starts at 0 and grows by 30 km every hour, so the gap is proportional to time as well: it is 30t km after t hours.
(c) The passenger train needs \displaystyle \frac{400}{80} = 5 hours and the freight train \displaystyle \frac{400}{50} = 8 hours, so the passenger train arrives 3 hours sooner, where its line reaches height 400.
Time up the side, distance along the bottom
Mia times herself on a walking trail and draws her graph the other way round: distance in kilometers along the horizontal axis and time in minutes up the vertical axis. The graph is a straight line through the origin and (3, 45).
(a) Is time proportional to distance? What is the constant of proportionality, and what does it mean?
(b) What is her walking speed in kilometers per hour?
(c) How long does she take to walk 5.2 km?
Solution(a) Yes: the graph is a straight line through the origin. Here \displaystyle k = \frac{45}{3} = 15, and since x is distance and y is time, it means 15 minutes for each kilometer, the point (1, 15).
(b) Read the other way round, the constant is \displaystyle \frac{3}{45} = \frac{1}{15} km per minute, the reciprocal of 15. An hour is 60 minutes, so her speed is \displaystyle \frac{1}{15} \times 60 = 4 km per hour.
(c) 15 \times 5.2 = 78, so 78 minutes, which is 1 hour and 18 minutes.
Are two points enough?
Two drones rise straight up, each at a steady speed. Two points are read off each drone’s straight-line graph of height h in meters against time t in seconds.
(a) Drone A: (4, 10) and (10, 25).
(b) Drone B: (4, 10) and (10, 22).
Is height proportional to time?
SolutionTwo points fix a straight line, so the only question is whether it passes through the origin. It does exactly when both points lie on one line y = kx, that is, when the two ratios agree.
(a) \displaystyle \frac{10}{4} = 2.5 and \displaystyle \frac{25}{10} = 2.5. Both points lie on h = 2.5t, whose graph passes through the origin. Proportional: the drone climbs 2.5 meters each second, starting from the ground.
(b) \displaystyle \frac{10}{4} = 2.5 but \displaystyle \frac{22}{10} = 2.2. Not proportional. To see where the line does cross the vertical axis, follow it back. Between the two points it climbs 22 - 10 = 12 meters in 10 - 4 = 6 seconds, which is 2 meters each second. Going back the 4 seconds from (4, 10) to t = 0 takes away 4 \times 2 = 8 meters, so the line crosses at (0, 2). Drone B took off from something 2 meters high, perhaps a roof. Its height above the ground was never a fixed multiple of the time, but its height above its take-off point, h - 2, is, with k = 2.
Boundaries
The whole graph, or a stated stretch of it. A graph made of straight pieces is proportional as a whole only if the pieces line up into one line through the origin (Example 3(b)). A distance-time graph is straight only while the speed stays the same, and real journeys speed up, slow down and stop, so a real graph is proportional at best over a stretch of steady speed, as Ben’s first hour is.
A drawing is evidence, not proof. A point a little off the line looks as if it is on it (Example 2(b)), and a line drawn near the origin may in fact cross the axis just above it. When the coordinates are known, compare \displaystyle \frac{y}{x} across the points with x \ne 0, and check separately that the only point on the vertical axis is (0, 0); that decides it.
Steepness depends on the scale. The constant is read from the numbers on the axes, not from how steep a line looks on the page. Two lines can be compared by steepness only when they share the same axes (Example 5). Stretch the vertical scale and every line looks steeper, though no speed has changed.
What exactly is measured, and on which axis. A distance measured from a fixed landmark is proportional to time only if the journey starts at that landmark (Examples 1(b) and 7(b)). Swapping the axes keeps a proportional graph proportional but replaces k by \displaystyle \frac{1}{k} (Example 6).
Points or a line. When only some values make sense, such as whole numbers of laps, the graph is a set of separate points, proportional when they lie on one line through the origin; the line is not drawn through the gaps. Time and distance take every value in between, so journeys are drawn as unbroken lines.
The two axes, and the sign of k. This lesson takes k positive, as it is for any motion at a steady speed. The horizontal axis is a straight line through the origin, the graph of y = 0x (a parked bicycle, whose distance is 0 at every time), but it is not counted as proportional, the same choice the equation lesson makes: every output is 0, so the output says nothing about the input, and the relationship cannot be turned round. The vertical axis is not the graph of y = kx for any k, since it puts many values of y above the single x = 0. A line through the origin that slopes downward, such as a position measured eastwards for someone walking west, is proportional with k negative. A downward line that misses the origin, such as the distance still to go on a walk (Exercise 9), is not proportional.
Where this goes next
The graph’s partner is the equation y = kx: recognizing a proportional relationship in an equation reads the same test off a formula, where “through the origin” becomes “nothing added on the end”. Graphing a line from a table is the step that turned Example 1’s tables into pictures.
The steepness of the line is the start of Slope: for a line through the origin it is the constant k, and for any line it is the rate of change, with slope triangles showing why one line has one steepness everywhere. Lines that miss the origin, like Asha’s from the hut, have the form y = kx + b with b \ne 0, and linear and nonlinear functions sorts them from curves like the cyclist rolling downhill. In later courses a proportional relationship is also called direct variation, and the speeds read off these graphs belong to the wider story of speed, distance and time.
Exercises
Part 1: tables and lists of points
For each, decide whether the second quantity is proportional to the first. If it is, give the constant of proportionality; if it is not, say which half of the test fails.
- A train: time (minutes) 0, 5, 10, 15; distance traveled (km) 0, 7, 14, 21.
- A cyclist: time (hours) 0, 1, 2, 3; distance from home (km) 6, 18, 30, 42.
- A walker on a trail, as (\text{time}, \text{distance}): (2, 5), (4, 10), (8, 20), (12, 30).
- A ferry, as (\text{time}, \text{distance}): (1, 4), (3, 12), (5, 18), (6, 24).
- A skateboarder rolling down a ramp, as (\text{time}, \text{distance}): (0, 0), (1, 2), (2, 8), (3, 18).
Part 1: graphs described in words
Decide whether each graph shows a proportional relationship, and give the reason.
- A straight line through (0, 3) and (2, 9).
- A straight line through (0, 0) and (4, 6).
- A runner’s graph of distance in kilometers against time in hours: a straight piece from (0, 0) to (2, 20), then a steeper straight piece from (2, 20) to (3, 34). Is the whole graph proportional? Is any part of it?
- The distance still to go on a 12 km trail, against time in hours, for a walker at 3 km per hour: a straight line from (0, 12) down to (4, 0).
Part 1: points on a line through the origin
- The point (3, 7.5) lies on the graph of a proportional relationship. Give the constant of proportionality and two more points on the graph.
- Is the point (7, 16) on the straight line through the origin and (4, 9)? Find the point of that line whose first coordinate is 7.
Part 2: reading a proportional graph
- A cyclist’s graph of distance d km against time t hours is a straight line through the origin and (3, 54). (a) Find the constant of proportionality and the point where it shows on the graph. (b) How far has the cyclist gone after 2.5 hours? (c) How long does 81 km take?
- A walker’s graph of distance in kilometers against time in minutes is a straight line through the origin and (40, 3). Find the walker’s speed in kilometers per minute and in kilometers per hour, and how far the walker goes in 2 hours.
- Lena and Omar cycle from the same gate at the same moment. On the same axes, with time in hours and distance in kilometers, Lena’s graph is a straight line through the origin and (2, 36), and Omar’s through the origin and (3, 48). Whose line is steeper? How far apart are they after 4 hours?
- A ferry’s graph has distance in kilometers along the horizontal axis and time in minutes up the vertical axis. It is a straight line through the origin and (6, 15). What is the constant of proportionality, and what does it mean? What is the ferry’s speed in kilometers per hour?
- A train runs at a steady 120 km per hour, and its graph of distance in kilometers against time in hours is drawn. Give the points on the line above t = 1 and above t = 1.5, and say what the point (0, 0) means.
- A hot-air balloon rises at a steady speed. Two points read off its straight-line graph of height in meters against time in minutes are (2, 30) and (5, 75). Is height proportional to time? If so, give the constant.
- A cable car rises at a steady speed. Two points read off its straight-line graph of height in meters against time in seconds are (3, 20) and (6, 35). Is height proportional to time? Where does the line cross the vertical axis, and what does that mean?
- A train’s graph of distance in kilometers against time in hours is a straight line through the origin and (2.5, 200). Write the relationship as an equation, and find how far the train goes in 45 minutes.
Reasoning
- Explain why the graph of every proportional relationship passes through the origin. Use a journey to say what the origin means.
- Show that if (x, y) is a point on the graph of y = kx, then so is (2x, 2y). Then use the staircase picture to explain why the graph cannot bend.
- Two walkers’ graphs are drawn on separate grids, and one line looks steeper than the other. Explain why that alone does not show who walks faster, and say what you would check instead.
- The graphs of y = kx and y = mx, with k > m > 0, are drawn on the same axes. Explain why the first line is above the second at every positive x, why the two lines meet only at the origin, and why the vertical gap between them is itself proportional to x.
- A straight line passes through the origin and through (a, b), with a \ne 0. Explain why every point (x, y) on it with x \ne 0 has \displaystyle \frac{y}{x} = \frac{b}{a}.
Answers
- Proportional, k = 1.4 km per minute. The first point is (0, 0), and \displaystyle \frac{7}{5} = \frac{14}{10} = \frac{21}{15} = 1.4.
- Not proportional: the points lie on a straight line, since each hour adds 12 km, but it crosses the vertical axis at (0, 6), not the origin. The ratios 18, 15 and 14 differ.
- Proportional, k = 2.5. \displaystyle \frac{5}{2} = \frac{10}{4} = \frac{20}{8} = \frac{30}{12} = 2.5.
- Not proportional: the points are not on one line. \displaystyle \frac{4}{1} = \frac{12}{3} = \frac{24}{6} = 4, but \displaystyle \frac{18}{5} = 3.6; the line y = 4x passes through (5, 20), not (5, 18).
- Not proportional: through the origin, but not straight. The ratios \displaystyle \frac{2}{1} = 2, \displaystyle \frac{8}{2} = 4 and \displaystyle \frac{18}{3} = 6 grow, and the steps up, 2, 6 and 10, are unequal.
- Not proportional: straight, but it crosses the vertical axis at (0, 3), not the origin.
- Proportional: straight and through the origin, with \displaystyle k = \frac{6}{4} = 1.5.
- Not as a whole, because the speed changes. The first piece lies on y = 10x, but (3, 34) has \displaystyle \frac{34}{3} \approx 11.33, not 10. The first 2 hours alone are proportional, with k = 10.
- Not proportional: the line starts at (0, 12), not the origin, and the distance to go shrinks as the time grows. The distance walked, 3t km after t hours, is proportional, with k = 3.
- \displaystyle k = \frac{7.5}{3} = 2.5. Any two of (0, 0), (1, 2.5), (2, 5) and (6, 15), or any point (x, 2.5x).
- No. The line is y = 2.25x, since \displaystyle \frac{9}{4} = 2.25, and above x = 7 it is at 2.25 \times 7 = 15.75, so the point is (7, 15.75). The point (7, 16) is 0.25 above it; put another way, \displaystyle \frac{16}{7} \approx 2.29, not 2.25.
- (a) \displaystyle k = \frac{54}{3} = 18, shown at (1, 18): 18 km per hour. (b) 18 \times 2.5 = 45 km. (c) \displaystyle \frac{81}{18} = 4.5 hours.
- \displaystyle \frac{3}{40} = 0.075 km per minute, which is 0.075 \times 60 = 4.5 km per hour. In 2 hours the walker goes 4.5 \times 2 = 9 km.
- Lena’s line is steeper: her constant is \displaystyle \frac{36}{2} = 18 against Omar’s \displaystyle \frac{48}{3} = 16. After 4 hours they have gone 72 km and 64 km, so they are 8 km apart.
- \displaystyle k = \frac{15}{6} = 2.5: the ferry takes 2.5 minutes for each kilometer. Its speed is \displaystyle \frac{1}{2.5} = 0.4 km per minute, and 0.4 \times 60 = 24 km per hour.
- (1, 120) and (1.5, 180), since 120 \times 1.5 = 180. The point (0, 0) means that at the start, no distance has been covered.
- Yes: \displaystyle \frac{30}{2} = 15 and \displaystyle \frac{75}{5} = 15, so both points lie on h = 15t, which passes through the origin. k = 15 meters per minute.
- Not proportional: \displaystyle \frac{20}{3} \approx 6.67 but \displaystyle \frac{35}{6} \approx 5.83. The line climbs 15 meters in 3 seconds, 5 meters each second, so going back 3 seconds from (3, 20) gives (0, 5): the car started 5 meters above the ground.
- \displaystyle k = \frac{200}{2.5} = 80, so d = 80t. 45 minutes is 0.75 hours, and 80 \times 0.75 = 60, so the train goes 60 km.
- A proportional relationship has y = kx for one number k. When x = 0, y = k \cdot 0 = 0, whatever k is, so (0, 0) is on the graph. For a journey at a steady speed it says that at time 0 no distance has yet been covered.
- If y = kx, then 2y = 2(kx) = k(2x), so (2x, 2y) fits y = kx too. In the staircase picture, going from any x to x + 1 raises y from kx to kx + k: every equal step across gives the same rise k, wherever it is taken. A graph that rises by the same amount for every equal step across has the same steepness everywhere, so it cannot bend.
- How steep a line looks depends on the scales of the axes: stretching the vertical scale makes the same line look steeper. Compare the constants instead. Read a point (x, y) off each line using the numbers on its axes and compare \displaystyle \frac{y}{x}, or redraw both lines on the same axes.
- At any x the gap is kx - mx = (k - m)x, by the distributive property. Since k - m > 0, this is positive for every positive x, so the first line is above the second there. The lines meet where kx = mx, that is (k - m)x = 0, and a non-zero number times x is 0 only when x = 0: the origin. The gap (k - m)x is one fixed number times x, so it is proportional to x with constant k - m, as the gap between the trains of Example 5 was.
- The line is straight, so it climbs the same amount for every step of 1 across. From the origin to (a, b) it climbs b in a steps across, which is \displaystyle \frac{b}{a} for each step. Starting from height 0 at the origin, after x steps across it has climbed \displaystyle \frac{b}{a} \cdot x, so \displaystyle y = \frac{b}{a}x at every point of the line, and \displaystyle \frac{y}{x} = \frac{b}{a} whenever x \ne 0.