Linear Equations

Direct Variation and the Line Through the Origin

Learn what y = kx means, how to find the constant of variation, and why every direct variation graphs as a line through (0, 0).

Key takeaways

  • Direct variation is the rule y = kx, where k is a fixed nonzero number.
  • For every pair with x ≠ 0, the ratio y/x equals the same k.
  • One known pair other than (0, 0) is enough to find k and therefore the whole rule.
  • The graph passes through the origin and has slope k, rising if k is positive and falling if k is negative.
  • A straight line that misses the origin is linear but is not a direct variation.

Two quantities vary directly when one is always the same constant multiple of the other: y = kx, with k ≠ 0. The number k is the constant of variation, and the graph is a straight line through the origin whose slope is k.

This is the simplest relationship two changing quantities can have. Double one and the other doubles; cut one to a third and the other follows. You will also hear it called direct proportion, and "y is proportional to x" means the same thing.

What makes the relationship direct

The rule y = kx says that y is built from x by one multiplication and nothing else. There is no starting amount to add, no minimum, and no change in the rate as x grows.

That is why the language "k times as much" fits. If apples cost the same per kilogram whatever the quantity, then the cost is always that price times the weight. Buy nothing and pay nothing. Buy twice as much and pay twice as much. A bulk discount would break the rule, because the price per kilogram would then depend on how much you buy.

Order matters in the wording. "y varies directly with x" gives y = kx. The same pair of quantities also satisfies x = (1/k)y, so x varies directly with y too, with the reciprocal constant. If a cost is 4 dollars per kilogram, then you get 0.25 kilograms per dollar. Both statements describe one line, read from two directions, and you must be clear about which constant you are using.

The constant of variation

Divide both sides of y = kx by x, when x is not zero, and you get y/x = k. So the test for direct variation is a constant ratio.

x y y/x
2 7 3.5
5 17.5 3.5
8 28 3.5

All three ratios agree, so these data fit y = 3.5x. The table cannot prove the rule holds for values you have not seen, but it is consistent with it.

When x = 0, the rule gives y = 0. The ratio 0/0 is undefined there, so do not test the origin by dividing. Check instead that zero input gives zero output.

The constant carries units: those of y divided by those of x. If y is a cost in dollars and x a weight in kilograms, k is in dollars per kilogram. This is the unit price, discussed in unit rates and the constant of proportionality.

Finding the rule from one pair

Suppose y varies directly with x, and y = 18 when x = 4. Find y when x = 10.

y = kx
18 = k·4              (substitute the known pair)
k = 4.5
y = 4.5x              (write the rule)
y = 4.5·10 = 45

The three steps are always the same: write the general form, use the known pair to find k, then use the rule to answer the question. Writing the rule down in the middle means you can answer any further question, including the reverse one. If y = 72, then x = 72/4.5 = 16.

Solving a direct variation problem
1 Write the form y = kx 2 Find k 18 = 4k, so k = 4.5 3 State the rule y = 4.5x 4 Use it At x = 10, y = 45 Write the form y = kx 1 Find k 18 = 4k, so k = 4.5 2 State the rule y = 4.5x 3 Use it At x = 10, y = 45 4

The proportion shortcut

Because the ratio is constant, any two pairs satisfy y₁/x₁ = y₂/x₂, provided x₁ and x₂ are not zero. For the example above:

18/4 = y/10
4y = 180
y = 45

This skips naming k. It is handy for a single question and is solved as in solving proportions. Finding k is better when you need several answers or want to interpret the rate.

Direct variation also scales in a simple way. If x is multiplied by any factor, y is multiplied by the same factor, since k(cx) = c(kx). Increase x by 20 percent and y increases by 20 percent, whatever k is.

Why the line goes through the origin

Compare y = kx with the slope-intercept form y = mx + b. Here m = k and b = 0. The line therefore crosses the y-axis at 0, and it rises k units for every 1 unit to the right.

You can graph any direct variation with just two points: (0, 0) and (1, k). For y = 3.5x, plot (0, 0) and (2, 7) to avoid the half unit, then draw the line.

  • If k > 0, the line rises from left to right.
  • If k < 0, it falls: as x increases, y decreases at a steady rate.
  • A larger absolute value of k gives a steeper line on the same axes.

A negative k still counts as direct variation under this definition, because the ratio is constant. Some courses restrict k to positive values, so check the convention in your textbook.

The slope idea itself is developed in slope as a rate of change. Two quick readings of a graph give k: pick a clear point on the line and divide its height by its horizontal position.

Interpreting k in a sentence

A constant is most useful when you can say what it means. The pattern is "for each additional unit of x, y changes by k units," and for direct variation you may add "and y is k when x is 1."

Say a hypothetical pump fills a tank so that the volume of water added is V = 12t, with V in liters and t in minutes. The constant says water enters at 12 liters per minute. After 7.5 minutes, 90 liters have entered. To add 300 liters takes 300/12 = 25 minutes.

Note the wording "water added." If the tank already held 50 liters, the total volume would be 50 + 12t. The added amount varies directly with time, while the total does not. Choosing what to call y can turn a merely linear relationship into a direct one, which is often a good way to set up a problem.

The model also has limits. Once the tank is full, the rule stops applying, so t has a largest meaningful value. Negative times may have no meaning either, which is why the graph of a physical direct variation is often a ray starting at the origin.

Not every straight line qualifies

Take a hypothetical taxi fare of 3 dollars plus 2 dollars per kilometer: y = 2x + 3. It is a straight line with steady change, yet it starts at 3.

At 1 km the fare is 5, a ratio of 5 per kilometer. At 10 km it is 23, a ratio of 2.3. The ratio changes, so this is not direct variation. Doubling the distance from 1 to 2 km moves the fare from 5 to 7, far from double.

Rule Straight line? Through origin? Direct variation?
y = 2x yes yes yes
y = 2x + 3 yes no no
y = 2x² no yes no
y = −4x yes yes yes

The third row shows that passing through the origin is not sufficient either. There y is directly proportional to x², not to x, a pattern treated in variation with squares and inverse squares.

Examples from measurement

  • Unit conversion. Length in centimeters is exactly 2.54 times length in inches.
  • Circles. Circumference varies directly with diameter, with constant π.
  • Steady speed. At constant speed v, distance d = vt, so distance varies directly with time.
  • Springs. Within its elastic limit, an ideal spring stretches in proportion to the force applied, a relationship known as Hooke's law.

Take the spring. Say a force of 12 newtons stretches a particular spring 3 cm. Writing F = kx gives k = 4 newtons per centimeter. A force of 20 newtons would then stretch it 5 cm, as long as the spring stays within the range where the law holds. Stretch it too far and it deforms, and the straight line stops describing it.

Temperature conversion is a useful counterexample. F = 1.8C + 32 is linear, but 0 °C is not 0 °F, so Fahrenheit readings do not vary directly with Celsius readings.

Sums of direct variations

If two quantities each vary directly with x, so does their sum. With y = 3x and z = 5x, the total y + z = 8x has constant 8. The difference z − y = 2x does too.

The product behaves differently: yz = 15x², which varies with the square of x. And adding a fixed amount, as in y + 4, destroys direct variation altogether. Knowing which operations preserve the pattern helps you predict the form of a formula before computing it.

Chains work as well. If y = 3x and w = 4y, then w = 12x. The constants multiply, which is exactly what happens when you string unit conversions together.

Reading direct variation from data

Real measurements wobble. If you record weights and costs, or forces and stretches, the ratios will not match perfectly.

  1. Compute y/x for each pair and see whether the values cluster around one number without a steady drift.
  2. Plot the points and check whether a ruler through the origin passes close to all of them.
  3. Be wary of ratios from very small x, where a tiny measuring error changes the ratio a lot.
  4. State the range of x you actually tested.

If the ratios rise or fall steadily while the differences stay even, suspect a nonzero intercept. If they grow along with x, the relationship may involve a power. Sorting these patterns is the topic of identifying a function family from a table.

Practice

  1. p varies directly with q, and p = 21 when q = 6. Find p when q = 14.
  2. A line through the origin passes through (5, −10). What is k?
  3. Does the table (1, 4), (3, 12), (6, 25) show direct variation?
1. k = 21/6 = 3.5, so p = 3.5·14 = 49
2. k = −10/5 = −2, so y = −2x
3. ratios are 4, 4 and 25/6; they are not all equal, so no (not exactly)

In the third, measured data with that small mismatch might still be modeled as y ≈ 4x, but exact values cannot be called a direct variation. Decide which kind of data you have before answering.

Written for 4Algebra with AI writing tools and not reviewed line by line by a person. Check anything you rely on against a textbook or primary source. Report an error.

Keep reading

All 36 articles in Linear Equations →

Latest news on this topic