Choose direct or inverse variation and enter the coordinates of one point on the graph. If you also enter an x, the value of y for that x is calculated too.
Table of Contents
-
What you can do on this page
-
What is this calculation used for?
-
How to Use
-
Formulas and graphs
-
Symbols and terms
-
Good to know before you start
-
How to calculate it in Excel
-
How to calculate it in Google Sheets
-
How to calculate it in Python
-
How to write it in LaTeX and other math languages (copy and paste)
-
How to have ChatGPT do the calculation
-
DataChef Features
-
Related Features
-
NumberChef Calculators List
What you can do on this page
- Enter the coordinates of just one point on the graph, and you get the direct variation equation \(y = ax\) or the inverse variation equation \(y = \dfrac{a}{x}\) and the constant of variation \(a\) on the spot
- The constant of variation is found the way it is taught in school, as "\(y\) divided by \(x\)" (for inverse variation, "\(x\) times \(y\)"), with the steps shown. The answer is an exact fraction in lowest terms, such as \(-\dfrac{2}{3}\)
- It can also find the value of \(y\) for an \(x\) you choose (optional)
- It also shows a table of values for \(x = -6\) to \(6\) and a graph (a straight line through the origin for direct variation, a hyperbola for inverse variation)
- Coordinates can be decimals, negative numbers or fractions such as 3/4
What is this calculation used for?
The cost of \(x\) pens at $3 each is \(y = 3x\) dollars. The unit price is the constant of variation, and if you buy twice as many, you pay twice as much. Quick estimates such as "how much for 8?" are this equation at work.
Prices by weight (apples at $2 per pound: 3 pounds cost \(2 \times 3 = 6\) dollars) and gas at the pump ($3.50 per gallon: 10 gallons cost $35) work the same way. When there is no bulk discount, the cost is directly proportional to the amount.
For a car driving at a steady speed, the distance covered is directly proportional to the time (at 60 mph, \(y = 60x\)). A car that gets 30 miles per gallon can go \(y = 30x\) miles on \(x\) gallons, so with 12 gallons left it can go about \(30 \times 12 = 360\) more miles.
These are estimates that assume the speed and fuel economy stay about the same, but they are the most common direct variation calculations when planning a trip or a drive.
For a trip to a place 120 miles away, the travel time is \(y = \dfrac{120}{x}\) hours, where \(x\) is the speed in mph. At 60 mph it takes 2 hours; at 30 mph, 4 hours. Doubling the speed cuts the time in half, a classic example of inverse variation.
The sign of inverse variation is a product that stays fixed: speed × time = distance. You can use it to compare the travel times of a train and a bus, or to plan your pace.
If \(x\) people split 600 flyers evenly, each person hands out \(y = \dfrac{600}{x}\) flyers. Double the number of people, and each person's share is cut in half.
Whenever a fixed amount of work is shared equally, such as getting ready for a school fair or dividing up data entry, this inverse variation gives a guide for how many people you need.
How far a spring stretches is directly proportional to the weight hanging from it (Hooke's law, taught in science class). If a spring stretches 4 cm under 20 g, the stretch is \(y = 0.2x\) cm (\(x\) is the mass in grams), so 50 g stretches it 10 cm. The constant of variation shows how easily the spring stretches.
A spring scale, which measures weight by how far a spring stretches, is built on this property. But the law only holds as long as the spring is not stretched so far that it cannot spring back.
Formulas and graphs
Symbols and terms
Symbols
| \(x,\ y\) | ex, why | Letters for two quantities that change together (variables). By custom, letters near the end of the alphabet, \(x,\ y,\ z\), stand for numbers that can take many values and are not fixed yet (this is said to come from the way the mathematician Descartes used them). |
| \(a\) | a | The letter for the constant of variation. By custom, letters near the start of the alphabet, \(a,\ b,\ c\), stand for fixed numbers (constants). Many textbooks use \(k\) instead. In both \(y = ax\) and \(y = \dfrac{a}{x}\), once \(a\) is known, the whole equation is known. |
| \((2,\ 6)\) | two, six (a point) | The way to write the coordinates of a point. The first number in the parentheses is the \(x\)-coordinate and the second is the \(y\)-coordinate. "Passes through the point \((2,\ 6)\)" says that \(y = 6\) when \(x = 2\). |
| \(\div\), \(\times\) | divided by, times | The signs for division and multiplication. The constant of variation is \(y \div x\) for direct variation and \(x \times y\) for inverse variation. In algebra, the multiplication sign is left out, so \(ax\) stands for \(a \times x\). |
| \(\neq\) | is not equal to | The sign for "not equal". It is an equals sign with a slash through it. The "\(a \neq 0\)" in the definitions of direct and inverse variation says that \(a\) is any number other than 0. |
Terms
| direct variation | A relationship where doubling or tripling \(x\) also doubles or triples \(y\). We also say "\(y\) is directly proportional to \(x\)". The equation is \(y = ax\) (\(a \neq 0\)), and the graph is a straight line through the origin. It is taught in middle school (Grade 7) as a proportional relationship. |
| inverse variation | A relationship where doubling or tripling \(x\) makes \(y\) \(\dfrac{1}{2}\) or \(\dfrac{1}{3}\) as large. We also say "\(y\) is inversely proportional to \(x\)". The equation is \(y = \dfrac{a}{x}\) (\(a \neq 0\)), and \(x \times y\) is always the same. The graph is a hyperbola. |
| constant of variation | The \(a\) in \(y = ax\) and \(y = \dfrac{a}{x}\), also called the constant of proportionality. It is the fixed number that decides the equation: \(y \div x\) for direct variation, and \(x \times y\) for inverse variation, equals this value at every point. |
| function | A rule that takes in a number and gives back exactly one number. Direct and inverse variation are both functions, because each value of \(x\) gives exactly one value of \(y\). |
| variable | A letter that can take many values. In direct and inverse variation, \(x\) and \(y\) are the variables, as opposed to a fixed number (a constant) such as \(a\). |
| coordinates | A pair of numbers \((x,\ y)\) that gives the position of a point. The horizontal position is the \(x\)-coordinate and the vertical position is the \(y\)-coordinate. A graph is the set of all points \((x,\ y)\) that make the equation true. |
| origin | The center of the coordinate plane, \((0,\ 0)\). It is labeled \(O\), the first letter of "origin". The graph of a direct variation always passes through the origin. |
| hyperbola | The pair of smooth curves that forms the graph of an inverse variation. The curves get closer and closer to the \(x\)-axis and the \(y\)-axis but never touch them. |
| table of values | A table that lists values of \(x\) with the matching values of \(y\). Textbooks use it to check the properties of direct and inverse variation (how \(y\) changes when \(x\) is doubled or tripled). |
Good to know before you start
Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.
If you get stuck, going back over these topics is the fastest way forward.
| Positive and negative numbers (Grade 7) |
|
| Algebraic expressions (Grades 6–7) |
|
| The coordinate plane (Grades 5–6) |
|
| Working with fractions (Grades 4–6) |
|
| Two quantities that change together (Grades 6–7) |
|
How to calculate it in Excel
| x-coordinate of the point | 2 |
| y-coordinate of the point | 6 |
| Constant a = y ÷ x | =B2/B1 |
| x to find y for | 5 |
| y = a × x | =B3*B4 |
| x-coordinate of the point | 2 |
| y-coordinate of the point | 6 |
| Constant a = x × y | =B1*B2 |
| x to find y for | 8 |
| y = a ÷ x | =B3/B4 |
| Constant a | 3 | ||||||
| x | -3 | -2 | -1 | 0 | 1 | 2 | 3 |
| y = ax | =B2*$B$1 | =C2*$B$1 | =D2*$B$1 | =E2*$B$1 | =F2*$B$1 | =G2*$B$1 | =H2*$B$1 |
| Constant a | 12 | |||||||
| x | -4 | -3 | -2 | -1 | 1 | 2 | 3 | 4 |
| y = a/x | =$B$1/B2 | =$B$1/C2 | =$B$1/D2 | =$B$1/E2 | =$B$1/F2 | =$B$1/G2 | =$B$1/H2 | =$B$1/I2 |
The first table is the direct variation through the point (2, 6): the constant a is 3, and y is 15 when x = 5.
The second table is the inverse variation through the same point (2, 6): a is 12, and y is 1.5 (= 3/2) when x = 8.
The third and fourth tables build a table of values with an x row and a y row, as in textbooks. The $ in $B$1 keeps the reference to the constant fixed when you copy the formula across. The inverse variation table has no x = 0, because you cannot divide by 0 (inverse variation is not defined at x = 0).
How to calculate it in Google Sheets
| x-coordinate of the point | 2 |
| y-coordinate of the point | 6 |
| Constant a = y ÷ x | =B2/B1 |
| x to find y for | 5 |
| y = a × x | =B3*B4 |
| x-coordinate of the point | 2 |
| y-coordinate of the point | 6 |
| Constant a = x × y | =B1*B2 |
| x to find y for | 8 |
| y = a ÷ x | =B3/B4 |
| Constant a | 3 | ||||||
| x | -3 | -2 | -1 | 0 | 1 | 2 | 3 |
| y = ax | =B2*$B$1 | =C2*$B$1 | =D2*$B$1 | =E2*$B$1 | =F2*$B$1 | =G2*$B$1 | =H2*$B$1 |
| Constant a | 12 | |||||||
| x | -4 | -3 | -2 | -1 | 1 | 2 | 3 | 4 |
| y = a/x | =$B$1/B2 | =$B$1/C2 | =$B$1/D2 | =$B$1/E2 | =$B$1/F2 | =$B$1/G2 | =$B$1/H2 | =$B$1/I2 |
How to calculate it in Python
from fractions import Fraction
# A point (x1, y1) on the graph (a fraction such as 3/4 can be written Fraction(3, 4))
x1 = Fraction(2)
y1 = Fraction(6)
# Direct variation y = ax: the constant is "y divided by x"
constant_direct = y1 / x1
print(f"Constant a = {constant_direct} -> equation y = {constant_direct}x")
# Inverse variation y = a/x: the constant is "x times y"
constant_inverse = x1 * y1
print(f"Constant a = {constant_inverse} -> equation y = {constant_inverse}/x")
# The value of y for a chosen x
x_value = Fraction(8)
print(f"Direct: when x = {x_value}, y = {constant_direct * x_value}")
print(f"Inverse: when x = {x_value}, y = {constant_inverse / x_value}")
How to write it in LaTeX and other math languages (copy and paste)
y = ax
y = ax
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>y</mi>
<mo>=</mo>
<mi>a</mi>
<mi>x</mi>
</mrow>
</math>
y = a x
y == a x
y := a*x;
y = a*x;
y = ax
a = y ÷ x
a = \frac{y}{x}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>a</mi>
<mo>=</mo>
<mfrac>
<mi>y</mi>
<mi>x</mi>
</mfrac>
</mrow>
</math>
a = y/x
a == y/x
a := y/x;
a = y/x;
a = y/x
y = a/x
y = \frac{a}{x}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>y</mi>
<mo>=</mo>
<mfrac>
<mi>a</mi>
<mi>x</mi>
</mfrac>
</mrow>
</math>
y = a/x
y == a/x
y := a/x;
y = a/x;
y = a/x
a = x × y
a = xy
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>a</mi>
<mo>=</mo>
<mi>x</mi>
<mi>y</mi>
</mrow>
</math>
a = x y
a == x y
a := x*y;
a = x*y;
a = xy
How to have ChatGPT do the calculation
You are a math calculation assistant for direct and inverse variation. Do the following calculation by actually running Python code, and base your answer only on the numbers from the execution result (do not answer by mental math or guessing). y varies directly with x, and the graph passes through the point (2, 6). 1. The constant of variation a (y divided by x), and y written as an equation in x 2. The value of y when x = 5 Also, if y varies inversely with x and the graph passes through the same point (2, 6): 3. The constant of variation a (x times y), and y written as an equation in x 4. The value of y when x = 8 (as a fraction in lowest terms and as a decimal) In Python, use the fractions module from the standard library to calculate exactly. Show the formulas you used and the numbers from the execution result.
How to Use
-
1Enter your numbersType the numbers you want to calculate with into the input fields
-
2CalculatePress the "Calculate" button
-
3Check the resultThe result appears on the spot. The same page also explains the idea behind the calculation and the formula
DataChef Features
No technical knowledge required.
Intuitive and user-friendly operation.
Can be used without registering personal information.
Automatic file deletion by clicking "download".
and rapid file conversion.
No attribution required.
No need to contact us for commercial use permission.
