Writing Equations With Two Variables (Definition, Basics, Branches, Facts, Examples) - BYJUS

Writing Equations With Two Variables

We know that variables are the unknown quantities in an algebraic equation. In some situations, the value of a variable might depend on the value of another variable. In such cases, the equation will have two variables. Here we will focus on how we can frame an equation in two variables with the given data. ...Read MoreRead Less

Select your child's grade in school:

Writing Equations with Two Variable

Two quantities that change in relation to one another are represented by a two-variable equation. An ordered pair that makes the equation true is a solution of a two-variable equation.

In two-variable equations, there is an “independent variable” and a “dependent variable”. The independent variable is the variable that represents a quantity that can change freely. Since its value is dependent on the independent variable, the other variable is referred to as the dependent variable.

Tables, Graphs, and Equations

Equations with two variables can be represented using tables and graphs. The independent variable is plotted on the horizontal axis, while the dependent variable is plotted on the vertical axis.

Example 1: 

The equation y = x + 2 is represented in the table, and the graph:


Independent variable (x)

Dependent variable (y)

Ordered Pair (x, y)


1 + 2 = 2

( 1, 2 )


2 + 2 = 4

( 2, 4 )


3 + 2 = 5

( 3, 5 )

Now, the graph shown here exhibits the ordered pairs:




Example 2: 

Solve the following equation to check whether the equation is forming a solution or not.

(a) y = 3x; (2, 6)

(b) y = 5x; (2, 15)



Part (a):

Given that: y = 3x

Substitute the values in the given equation:

\( \Rightarrow \) 6 = 3 . 2

\( \Rightarrow \) 6 = 6 

Therefore, (2, 6) will form the solution.


Part (b):

Given that: y = 5x

Substitute the values in the given equation:

\( \Rightarrow \) 15 = 5 . 2

\( \Rightarrow \) 15 ≠ 10 

Therefore, (2, 15) will not form the solution.


Example 3: 

The equation y = 64 – 8x represents the quantity of chemical y (in fluid ounces) that is left in a flask after pouring x cups of the chemical. Determine the variable that is independent and the variable that is dependent. After pouring 5 cups, what is the quantity of the chemical that remains in the flask?





Since the x number of cups you pour determines the quantity y of fluid ounces remaining, y is the dependent variable and x is the independent variable.


When x = 5, we solve the equation to find the value of y.


Write the given equation:

y = 64 – 8x


Substitute the value of x with 5.

y = 64 – 8 ( 5 )

y = 64 – 40

y = 24


There are 24 ounces of fluid remaining.


Example 4: 

Lifting weights burns 200 calories for an athlete. After that, the athlete works out on an elliptical trainer, burning 10 calories per minute. Create an equation that represents the total number of calories burned during the workout and graph it.



Write an equation using a word sentence of the given question:


Calories burned while lifting weights + calories burned per minute on the elliptical trainer times total number of minutes = Total number of calories burned.


Let c be the total number of calories burned and and m the number of minutes on the elliptical trainer, respectively.


200 + 10 . m = c


When graphing the equation, keep in mind that the total number of calories burned is proportional to the number of minutes. 


Create a table and plot the ordered pairs with minutes m, on the horizontal axis, and calories c on the vertical axis. After that, draw a line that connects the points.

Minutes (m)

Calories (c)







Now, draw a line connecting the points on the graph:




Example 5: 

A train travels between two cities at an average speed of 40 miles per hour. Make a graph and write an equation that represents the relationship between the time and the distance travelled by the train. How long does it take the train to travel 220 miles?





Let r be the speed of the train represented as 40-mile-per-hour speed. 


Consider d = 40t as the equation that represents the relationship between the time and the distance travelled by train using the distance formula.


A table can be created that mentions the time and the distance:


In this case, t will represent the time, and d will represent distance.

Time (hours), t

Distance (miles), d









The graph below will show the points in the table:




Now, we have to find the value of t, when the value of d is 220.


Given that: d = 40t

Substitute the value of d with 220.

220 = 40t


Using the division property of equality,

t = 5.5


Thus, the train will take 5.5 hours to complete a distance of 220 miles.

Frequently Asked Questions

A two-variable linear equation is defined as a linear relationship between x and y, or two variables, in which the value of one is dependent on the value of the other.


Let’s consider x as the independent variable, in this case, and y being dependent on it. Hence, y is referred to as the dependent variable.

When solving multi-variable, multi-step equations, the first rule is to make sure you have the same number of equations as the number of variables in the equations.


Then, for one of the variables, solve one of the equations and substitute that expression into the other equation.

A mathematical statement that is made up of two expressions brought together by an equal sign, is called an equation. 2x – 6 = 16 is an example of an equation. We get the value of the variable x as x = 11 when we solve this equation.