Lines & Graphs

Direct Variation: Formula, Examples and How to Solve It

Direct variation means two quantities are tied by y=kxy = kx, where the constant of variation kk is a fixed number other than zero. Equivalently, the ratio yx\frac{y}{x} is the same for every pair of values.

y=kxork=yxy = kx \quad \text{or} \quad k = \frac{y}{x}

Try it with your numbers

Show every step

The whole topic comes down to one multiplier. Once kk is known, every missing value is one multiplication or division away. Every question about whether a table, graph or word problem is a direct variation becomes one test: does yx\frac{y}{x} ever change?

Where does the direct variation formula come from?

The plain-language idea is that scaling xx by any factor scales yy by that same factor. Double xx and yy doubles. Shrink xx to a third and yy shrinks to a third. Take any known pair (x1,y1)(x_1, y_1) with x1≠0x_1 \neq 0 and call k=y1x1k = \frac{y_1}{x_1}. If xx is scaled by a factor cc, then yy is scaled by cc as well, so

y2x2=c y1c x1=y1x1=k.\frac{y_2}{x_2} = \frac{c\,y_1}{c\,x_1} = \frac{y_1}{x_1} = k.

The ratio never moves. Multiply both sides by xx and you have y=kxy = kx.

Hidden inside that argument is a fact most students miss: setting the scale factor to c=0c = 0 forces x=0x = 0 to give y=0y = 0. A direct variation always passes through the origin. That is exactly the case b=0b = 0 in slope-intercept form, and it is the feature that separates direct variation from an ordinary line. A starting amount or flat fee breaks the scaling, so the relationship is no longer direct.

The wording varies, but the meaning does not. ”yy varies directly as xx,” ”yy is directly proportional to xx” and ”yy is proportional to xx” all say y=kxy = kx. The number kk is the constant of variation, also called the constant of proportionality or the unit rate: the amount of yy per one unit of xx.

Quick check

yy varies directly as xx, and y=8y = 8 when x=6x = 6. What is yy when x=15x = 15?

How do you find the constant of variation?

Divide a known yy by its matching xx. That single quotient is kk, and it works for any one pair because the ratio is the same everywhere. The full routine has three steps:

  1. Compute k=yxk = \frac{y}{x} from the given pair.
  2. Write the equation y=kxy = kx with that value.
  3. Substitute the new value and solve for the unknown.

Example 1. yy varies directly as xx, and y=45y = 45 when x=6x = 6. Find yy when x=10x = 10.

k=456=152,y=152x,y=152⋅10=75.k = \frac{45}{6} = \frac{15}{2}, \qquad y = \frac{15}{2}x, \qquad y = \frac{15}{2} \cdot 10 = 75.

There is a faster route that skips kk. Because the ratio is constant, 456=y10\frac{45}{6} = \frac{y}{10}, so y=45⋅106=75y = \frac{45 \cdot 10}{6} = 75. Even quicker as a mental check: xx grew by the factor 106=53\frac{10}{6} = \frac{5}{3}, so yy must grow by the same factor, and 45⋅53=7545 \cdot \frac{5}{3} = 75.

Keep kk as an exact fraction. If k=43k = \frac{4}{3} and you round it to 1.331.33, every later answer drifts, and some tests will mark a correct method wrong.

Try this: Suppose y=28y = 28 when x=8x = 8. Without finding kk, get yy at x=12x = 12 by multiplying 2828 by the scale factor 128\frac{12}{8}. Then confirm by finding kk and computing kxkx.

How can you tell if a table or equation is direct variation?

Two tables compared: y rising by 2 gives changing ratios, while a steady ratio of 2.5 is direct variation
A table where y climbs by 2 each row still fails the test, because y ÷ x changes from 5 to 3.5 to 3.

For a table, divide yy by xx in every row. Matching quotients mean direct variation.

xx yy yx\frac{y}{x}
2 5 2.5
5 12.5 2.5
9 22.5 2.5

All three ratios equal 2.52.5, so y=2.5xy = 2.5x. Now compare a table with x=1,2,3x = 1, 2, 3 and y=5,7,9y = 5, 7, 9. The yy-values climb by 2 each step, which looks tidy, but the ratios are 55, 3.53.5 and 33. That is a line with a starting value, not a direct variation. Constant difference is not constant ratio, and mixing them up is the most common way to lose points here. If you are building these tables yourself, the method in graphing a line with a table of values produces exactly the rows you need to test.

For equations, solve for yy first, then look for a bare multiple of xx. The equation 5y=60x5y = 60x becomes y=12xy = 12x, which is direct. The equation 2y=18x+122y = 18x + 12 becomes y=9x+6y = 9x + 6, which is not, because of the +6+6. The equation 3y=37.2x3y = 37.2x becomes y=12.4xy = 12.4x, which is direct. Neither y=x2y = x^2 nor y=12xy = \frac{12}{x} qualifies.

In standard form of a line, the shortcut is to look at the constant term. An equation Ax+By=CAx + By = C is a direct variation exactly when C=0C = 0 and B≠0B \neq 0.

What does a direct variation graph look like?

It is a straight line through (0,0)(0, 0) whose slope is kk. The reason is one line of algebra: the slope between the origin and any point (x,y)(x, y) is y−0x−0=yx=k\frac{y - 0}{x - 0} = \frac{y}{x} = k, which is the slope formula applied to the origin. So the constant of variation and the slope are the same number.

To sketch one, mark the origin, then plot a second point such as (1,k)(1, k), and draw through both. A positive kk puts the line in the first and third of the four quadrants. A negative kk puts it in the second and fourth. The origin is also the only place the line meets the axes, so both intercepts are zero.

Fast graph check

A line is a direct variation only if it passes through (0,0)(0, 0). If it crosses the yy-axis anywhere else, it has b≠0b \neq 0 and fails the test.

To read kk off a graph, choose a point where the grid lines cross exactly, then divide its yy by its xx. Read the axis labels, not the squares. If the two axes use different scales, counting squares gives the wrong slope.

Direct variation with negatives and fractions

The constant kk can be negative or a fraction, and the method does not change. With a negative kk, yy falls as xx rises, yet the ratio yx\frac{y}{x} is still constant, so the relationship is still direct. The trap is seeing ”yy decreases” and calling it inverse. Direct and inverse are decided by what stays constant, not by which way the values move.

Example 2. yy varies directly as xx, and y=−9y = -9 when x=6x = 6. Find yy when x=−14x = -14.

k=−96=−32,y=−32x,y=−32⋅(−14)=21.k = \frac{-9}{6} = -\frac{3}{2}, \qquad y = -\frac{3}{2}x, \qquad y = -\frac{3}{2} \cdot (-14) = 21.

The sign makes sense: a negative kk times a negative xx gives a positive yy. Check with the ratio: 21−14=−32\frac{21}{-14} = -\frac{3}{2}, which matches kk.

Fractions matter most when you solve for xx. If y=25xy = \frac{2}{5}x and y=18y = 18, then x=18÷25=18⋅52=45x = 18 \div \frac{2}{5} = 18 \cdot \frac{5}{2} = 45. Check: 25⋅45=18\frac{2}{5} \cdot 45 = 18. Dividing by a fraction means multiplying by its reciprocal, and forgetting that is a classic slip.

Quick check

A direct variation passes through the point (−3,12)(-3, 12). Write its equation.

Direct variation vs inverse variation: how to tell them apart

Both describe how one quantity responds to another, but they hold different things fixed. Direct variation holds the ratio yx\frac{y}{x} constant. Inverse variation holds the product xyxy constant, giving y=kxy = \frac{k}{x}. When one doubles, the other halves.

A reliable test uses three questions:

  • Is yx\frac{y}{x} the same in every row? Then it is direct.
  • Is x⋅yx \cdot y the same in every row? Then it is inverse.
  • Is neither constant? Then the relationship is something else, such as a line with a starting value or a quadratic.

The same trip shows both. At a steady 60 miles per hour, distance is d=60td = 60t, a direct variation in time. For a fixed 120-mile trip, time is t=120vt = \frac{120}{v}, an inverse variation in speed. Which one applies depends on which quantity is held fixed, so read the problem for the constant before choosing a formula.

On a graph, direct variation is a straight line through the origin, while inverse variation is a curve that never touches either axis.

Direct variation as a power, and joint variation

Sometimes yy is proportional to a power of xx, not to xx itself. ”yy varies directly as the square of xx” means y=kx2y = kx^2, and the constant ratio is now yx2\frac{y}{x^2}. The three-step routine is unchanged.

Example 3. yy varies directly as the square of xx, and y=45y = 45 when x=3x = 3. Find yy when x=−4x = -4.

k=4532=459=5,y=5x2,y=5⋅(−4)2=5⋅16=80.k = \frac{45}{3^2} = \frac{45}{9} = 5, \qquad y = 5x^2, \qquad y = 5 \cdot (-4)^2 = 5 \cdot 16 = 80.

Square first, then multiply. Writing (−4)2(-4)^2 as −16-16 is the usual error, and it flips the sign of the answer.

What the exponent does

In y=kxny = kx^n, doubling xx multiplies yy by 2n2^n. That is 4 for a square and 8 for a cube, which is why doubling a circle's radius quadruples its area.

Joint variation uses two inputs: z=kxyz = kxy means zz is proportional to both. If z=24z = 24 when x=2x = 2 and y=3y = 3, then k=246=4k = \frac{24}{6} = 4. When nn is unknown, logarithm rules help: taking logs of y=kxny = kx^n gives log⁡y=log⁡k+nlog⁡x\log y = \log k + n\log x, a straight line whose slope is the exponent nn. This is how scientists extract the exponent from measured data.

Where direct variation shows up, and where it breaks

Direct variation fits any situation with a pure rate and no starting amount. Common examples include price per pound, an hourly wage with no base pay, currency conversion, distance at constant speed, scaling a recipe, map distances, an ideal spring where force is F=kxF = kx, and a resistor where voltage is V=IRV = IR. In each case kk carries units, such as dollars per pound or newtons per centimeter, and checking those units is a quick way to catch a setup error.

It breaks whenever something is added up front or the rate changes. A taxi that charges a 4 dollar booking fee plus 2 dollars per mile follows C=2m+4C = 2m + 4. That is linear, but a 10-mile ride costs 24 dollars, not double the 14 dollars of a 5-mile ride. Bulk discounts, tiered phone plans and a spring stretched past its limit fail for the same reason: the ratio drifts.

Temperature gives the most surprising case. Fahrenheit is F=1.8C+32F = 1.8C + 32, so 20∘C20^\circ\text{C} is 68∘F68^\circ\text{F} and 40∘C40^\circ\text{C} is 104∘F104^\circ\text{F}, not 136∘F136^\circ\text{F}. Doubling the Celsius reading does not double the Fahrenheit one, because the +32+32 shifts the line off the origin.

Quick check

A taxi charges a 4 dollar booking fee plus 2 dollars per mile. Is the cost a direct variation of the miles?

How do you check a direct variation answer?

Run three quick tests before moving on. First, put the original pair back into y=kxy = kx and confirm it reproduces the given numbers. Second, test a different pair if you have one, since the ratio must match. Third, ask whether the answer is the right size: if xx went up and kk is positive, yy must go up by the same factor.

Two-point data gives a neat check. For the points (4,10)(4, 10) and (10,25)(10, 25), the slope is 25−1010−4=156=2.5\frac{25 - 10}{10 - 4} = \frac{15}{6} = 2.5, and 104=2.5\frac{10}{4} = 2.5 as well. When the slope between two points equals the ratio yx\frac{y}{x} of a point, the line passes through the origin, so the data is a direct variation. If the two numbers differ, the equation of the line through the two points will contain a nonzero intercept.

This also ties to average rate of change. For a direct variation, the average rate of change between any two points is always kk. If two different intervals give two different rates, the relationship is not direct variation, no matter how neat the first few rows looked.

Practice problems

0 of 5 solved

  1. yy varies directly as xx, and y=14y = 14 when x=2x = 2. Find the constant of variation kk.

  2. yy varies directly as xx, and y=18y = 18 when x=4x = 4. Find yy when x=10x = 10.

  3. A table has the points (3,12)(3, 12), (5,20)(5, 20) and (8,32)(8, 32). Is it a direct variation? If so, write the equation.

  4. yy varies directly as xx, and y=−12y = -12 when x=8x = 8. Find xx when y=30y = 30.

  5. yy varies directly as the square of xx, and y=96y = 96 when x=4x = 4. Find yy when x=−5x = -5.

Common questions

What is the formula for direct variation?

The formula is y=kxy = kx, where kk is the constant of variation and k≠0k \neq 0. You can also write it as k=yxk = \frac{y}{x}, which says the ratio of yy to xx is the same for every pair of values.

What is the difference between direct variation and a linear equation?

Every direct variation is linear, but not every linear equation is a direct variation. A direct variation has the form y=kxy = kx with no added constant, so its graph passes through the origin.

Can the constant of variation be negative or a fraction?

Yes. A negative kk means yy falls as xx rises, and a fractional kk means yy grows more slowly than xx. The relationship is still direct variation because the ratio yx\frac{y}{x} stays constant.

How do you find the constant of variation from a graph?

Pick a point on the line where the grid lines cross cleanly, then divide its yy-coordinate by its xx-coordinate. The constant of variation equals the slope of the line.

Is direct variation the same as direct proportion?

Yes. Direct variation, direct proportion and proportional relationship all describe y=kxy = kx. The constant kk is also called the constant of proportionality or the unit rate.

How do you know if a table shows direct variation?

Divide yy by xx in every row. If every quotient is the same nonzero number, the table is a direct variation and that number is kk.

Up next