In algebra, we represent an unknown number using variables. We use letters to denote these variables.

A variable is a symbol that can be used to represent one or more numbers. A variable is any symbol that may be replaced by numbers. It is a letter used to represent an arbitrary element of a set called as a variable.

For example, consider the equation 2x + 3y = 10. Here, x and y are known as variables.

Example:

Solve 2x + x

Solution:

2x + x

Here, we observe that the variables are similar i.e. 2x, x. So, we need to add the variables.

2x + x = 3x

An unknown value in an algebraic expression is known as a variable. These variables are denoted by letters.

For example, let the cost of a pen be x dollar, then the cost of 2 pens will be x + x = 2x dollars. Here, we do not know the exact value of x, if we put the value of x = 2, then the cost of 2 pens is 4 dollars. If we put the value of x = 3, then the cost of 2 pens is 6 dollars. So, we observe that we can put any values in place of x. Here, x is known as a variable.
Given below are some examples that explain how to simplify variables.

Example 1:

Solve 2m + 2m + m

Solution:

2m + 2m + m

Here, we observe that the variables are similar i.e. 2m, 2m, m. So, we need to add the variables.

2m + 2m + m = 5m

Example 2:

Solve 15p - p - 4p

Solution:

15p - p - 4p

Here, we observe that the variables are similar i.e. 15p, p, 4p. So, we need to subtract the variables.

15p - p - 4p = 14p - 4p

= 10p

Example 3:

Solve 19n + 3n - 4n

Solution:

Here, we observe that the variables are similar i.e. 19n, 3n, 4n. So, we need to add the first two variables first and then subtract the last variable from it.

19n + 3n - 4n = 22n - 4n

= 18n

If the variables are different, then we cant add or subtract them.

For example, x + 2y has different variables x and y. And so, we can neither add nor subtract them.

Variables are divided into different categories:
  • Qualitative Variables
  • Quantitative Variables
  • Discrete Variables
  • Continuous Variables
  • Dependent Variable
  • Independent Variable

Qualitative Variables:


Qualitative variables are variables which cannot be measured. They are also known as attributes.

Examples on Qualitative Variables:


Given below are some examples on qualitative variables.
  • Intelligence
  • Color of a bag (red, green, blue etc)

Quantitative Variables:


Quantitative variables are variables which can be measured directly.

Examples on Quantitative Variables:


Given below are some examples on quantitative variables.
  • Height of a person
  • Age of children

Discrete Variables:


Discrete variables are those variables, which can take only selected values from a given range. So, there will be only a finite number of values in the given range. A discrete variable is one where the individual values of the variable differ from each other by a definite amount.

Examples on Discrete Variables:


Given below are some examples on discrete variables.
  • Number of children in a family. Here, we will get the values 0,1,2...for the variables. If the number of children is between 3 and 5, the answer will be only 4
  • The number of suitcases lost. Here, the number of suitcases lost must be a whole number. So, it is a discrete variable

Continuous Variables:


Continuous variables are those variables, which can take all the values from a given range. i.e they can take any value between the highest and lowest value in the series.

Examples on Continuous Variables:


Given below are some examples on continuous variables.
  • Height of a person. Here, height can assume any value. If the height of a person is between 142 and 152, the answer can be any value between 142 and 152, So, the height of a person is a continuous variable.
  • Weight of tomatoes can take infinitely many values. The weight of a tomato can be any decimal value. So, it is a continuous variable.

Dependent Variable:


In a dependent variable, the values are dependent on the values of one or more independent variables.

Examples on Dependent Variables:


Given below are some examples on dependent variables.
  • In m = 4n, m is a dependent variable, because it is dependent on the value of n.
  • In y = 3x + 5, y is a dependent variable, since it depends on the value of x.

Independent Variable:


Independent variables are those variables, whose values are not dependent on any values.

Examples on Independent Variables:


Given below are some examples on independent variables.
  • In x = 4y + 6, y is the independent variable in the equation. x is not an independent variable, because it depends on the value chosen for y.
  • In y = 3x, x is the independent variable, since it doesn't depend on any value.


In algebra, the variables vary. We add the variables only when they are like terms. If the given variables are unlike terms, we keep those terms as it is without performing any operations.

Example:

x + x ( Like terms)

x + y ( Unlike terms)

Examples on Adding Variables


Given below are some examples based on adding variables.

Example 1:

Solve $2y + x + 6y + 9x$

Solution:

Given $2y + x + 6y + 9x$

Rearrange the given terms
$2y + x + 6y + 9x$ = $x + 9x + 2y + 6y$

Now add the like terms
$x + 9x = 10x$

$2y + 6y = 8y$

Combine like terms
$2y + x + 6y + 9x$ = $10x + 8y$

Example 2:

$5a + 3b + c + 11b + 2c + 6a$

Solution:

$5a + 3b + c + 11b + 2c + 6a$

Rearrange the given terms
$5a + 3b + c + 11b + 2c + 6a$ = $5a + 6a + 3b + 11b + 2c + c$

Now, add like terms
$5a + 6a$ = $11a$
$3b + 11b$ = $14b$
$2c + c$ = $3c$

Combine like terms
$5a + 3b + c + 11b + 2c + 6a$ = $11a + 14b + 3c$


We subtract the variables only when they are like terms. If variables are unlike terms, we keep those variables the same with out performing any operations.

Example:

a - a ( Like terms )
a - b ( Unlike terms )

Examples on Subtracting Variables


Given below are some examples on subtracting variables.

Example 1:

$7m - 6m - 2m$

Solution:

Given $7m - 6m - 2m$

Now, subtract and combine like terms

$7m - 6m - 2m$ = $-m$

Example 2:

$8p - p - 5q - 2q$

Solution:

Given $8p - p - 5q - 2q$

Now subtract the like terms
$8p - p$ = $7p$
$-5q - 2q$ = $-7q$

Combine like terms
$8p - p - 5q - 2q$ = $7p - 7q$
= $7(p - q)$


When the variables are same in a multiplication problem, we multiply those variables and combine them together into a single factor or a variable. We write the expression in a shorter format by using powers. But, as with addition and subtraction we cant combine the different variables.

Example:

$m \times m \times m \times n \times n$ = $(m \times m \times m) \times (n \times n)$ ( Add the exponents )
= $m^{3}n^{2}$

Examples on Multiplying Variables


Given below are some examples on multiplying variables

Example 1:

$3 \times a \times a \times b \times c \times c$

Solution:

Given $3 \times a \times a \times b \times c \times c$

Multiplying variables

$a \times a$ = $a^{2}$
$b$ = $b^{1}$
$c \times c$ = $c^{2}$

Combine the variables
$3 \times a \times a \times b \times c \times c$ = $3 a^{2} b c^{2}$

Example 2:

$5 \times p \times p \times p \times 2 \times q \times q \times r \times r$

Solution:

Given $5 \times p \times p \times p \times 2 \times q \times q \times r \times r$

Multiplying variables

$5 \times 2$ = $10$
$p \times p \times p$ = $p^{3}$
$q \times q$ = $q^{2}$
$r \times r$ = $r^{2}$

Combine the variables
$5 \times p \times p \times p \times 2 \times q \times q \times r \times r$ = $10p^{3}q^{2}r^{2}$

When multiplying factors which contains variables, we multiply the coefficient and a variables as usual. In the variable, if the bases are the same, we can multiply the base by adding their exponents.

Example:

$a^{3} \times a^{2} \times b^{4} \times b^{3}$
$a^{3} \times a^{2}$ = $a^{3 + 2}$
$b^{4} \times b^{3}$ = $b^{4 + 3}$
$a^{3} \times a^{2} \times b^{4} \times b^{3}$ = $a^{3 + 2} \times b^{4 + 3}$
= $a^{5} b^{7}$

Examples on Multiplying Variables with Exponents


Given below are some examples on multiplying variables with exponents

Example 1:

$4 \times p^{3} \times p^{4} \times 2 \times q^{1} \times q^{2} \times 3 \times r^{5}$

Solution:

Given $4 \times p^{3} \times p^{4} \times 2 \times q^{1} \times q^{2} \times 3 \times r^{5}$

Multiplying bases and adding exponents,
$p^{3} \times p^{4}$ = $p^{3 + 4}$
$q^{1} \times q^{2}$ = $q^{1 + 2}$
$r^{5}$ = $r^{5}$
$4 \times 2 \times 3$ = $24$

Combine the terms

$4 \times p^{3} \times p^{4} \times 2 \times q^{1} \times q^{2} \times 3 \times r^{5}$ = $4 \times 2 \times 3 \times p^{3 + 4} \times q^{1 + 2} \times r^{5}$
= $24 \times p^{7} \times q^{3} \times r^{5}$

Example 2:

$2 \times a^{2} \times a^{6} \times b^{7} \times b^{3} \times 5 \times c^{9}$

Solution:

Given $2 \times a^{2} \times a^{6} \times b^{7} \times b^{3} \times 5 \times c^{9}$

Multiplying bases and adding exponents
$a^{2} \times a^{6}$ = $a^{2 + 6}$
$b^{7} \times b^{3}$ = $b^{7 + 3}$
$c^{9}$ = $c^{9}$
$2 \times 5$ = $10$

Combine the terms
= $(2 \times 5) \times a^{2 + 6} \times b^{7 + 3} \times c^{9}$
= $10 \times a^{8} \times b^{10} \times c^{9}$

Given below are some examples on solving for variables.

Example 1:

Solve for variable x in $x + 4$ = $9$

Solution:

Given $x + 4$ = $9$

Subtract by 4 on both the sides
$x + 4 -4$ = $9 -4$
$x$ = $5$

Example 2:

Solve for variable y in $8$ = $y - 5$

Solution:

Given $8$ = $y - 5$

Add 5 on both the sides
$8 + 5$ = $y - 5 + 5$
$13$ = $y$
$y$ = $13$

Example 3:

Solve for the variable m in $2m + 6$ = $18$

Solution:

Given $2m + 6$ = $18$

Subtract 6 from both the sides
$2m + 6 - 6$ = $18 - 6$
$2m$ = $12$

Now, divide by 2 on both the sides

$\frac{2m}{2}$ = $\frac{12}{2}$
$m = 6$

Example 4:


Solve for variable p in $7p - 8$ = $13$

Solution:

Given $7p - 8$ = $13$,

Add 8 on both the sides
$7p - 8 + 8$ = $13 + 8$
$7p$ = $21$

Now, divide by 7 on both sides

$\frac{7p}{7}$ = $\frac{21}{7}$
$p$ = $3$


The variable which influences the relationship between an independent and dependent variable are called as a confounding variable. But, confounding variables are neither independent nor dependent variable.

Examples on Confounding Variables:


There is a relation between matches and cancer. People who carry match boxes with them have a risk of getting cancer. This is because, those who carry matches in their pocket are most probably people who smoke and smoking causes cancer. In this example, smoking is the confounding variable.


A response variable measures the outcome of a study. But, an explanatory variable will explain or influence changes in a response variable. The response variable is complete depending on the explanatory variable.

Examples on Response Variables


Proper intake of carbohydrates and proteins gives energy to human body. Here, proper intake of carbohydrates and proteins is the explanatory variable and energy to human body is the response variable.

Ordinal variables are normal variables, whose values are established with some logical order. For example, young age, middle age and old age. Arrange all this age grouped in data. An ordinal variable, which has multiple categories can be ordered.

Examples on Ordinal Variables


The grade system we use in educational institutions are an example of an ordinal variable. In this, grade A ranks higher than grade B and grade B ranks higher than grade C. But the numeric difference between these three grades are not mentioned.

We define a random variable as a real function of the elements of a sample space S. Then, we shall represent the random variable with capital letters I.e. W, X and Y and for any particular value of the random variable by a lower case letter I.e w, x and y. This will define the sample space S with elements s, then we assign to every S a real number. In some experiments, random variables are implicitly used.

Examples on Random Variables


  • Toss two dice, X = Sum of the numbers
  • Toss a coin 25 times X = number of heads in 25 tosses
  • Apply different amounts of fertilizer to corn plants, X = yield/acre

Suppose we have a sample space S = {s1, . . . , sn} with a probability function P and we define a random variable X with range X = {x1, . . . , xm}. We can define a probability function PX on X in the following way. We will observe X = xi if and only if the outcome of the random experiment is an sj ∈ S such that X(sj ) = xi. Thus, PX(X = xi) = P ({sj ∈ S : X(sj ) = xi}).
→ Read More