Orchids Logo

Variables and Constants

Class 6Algebra

In arithmetic, you work with numbers like 5, 12, or 100. But in algebra, you also use letters like x, y, and n to stand for numbers. Why? Because sometimes we do not know the exact number, or the number can change.



A letter that stands for a number that can change is called a variable. A number that stays the same is called a constant. Understanding the difference between variables and constants is the first step in learning algebra.



In Class 6 Mathematics (NCERT), this topic is studied in the chapter Algebra. You will learn what variables and constants are, how they are used in everyday life, and how to write simple algebraic expressions using them.

What is Variables and Constants?

Definition:

  • A variable is a letter or symbol that represents a number whose value can change or is not yet known.
  • A constant is a number whose value is fixed and does not change.

Variable — details:

  • We usually use letters like x, y, z, n, a, b, p to represent variables.
  • A variable can take different values in different situations.
  • Example: "Riya's age" keeps changing every year. If we call it x, then x = 10 this year, x = 11 next year, x = 12 after that.
  • Example: "The number of students absent today" changes every day. We can call it n.

Constant — details:

  • A constant has a fixed value that never changes.
  • Examples: 5, 100, −3, 2.5, and 0 are all constants.
  • The number of days in a week is always 7 — it is a constant.
  • The value of pi (π) = 3.14159... is a constant.

Important:

  • In the expression 3x + 5, the number 3 and 5 are constants, and x is a variable.
  • The number 3 in front of x is called the coefficient of x.

Variables and Constants Formula

Writing algebraic expressions using variables and constants:


Pattern 1: Variable alone

x, y, n, p

A single letter representing an unknown number.


Pattern 2: Constant multiplied by a variable

3x, 5n, 2y, 7p

A constant times a variable. The constant is called the coefficient.


Pattern 3: Variable with a constant added or subtracted

x + 5, n − 3, 2y + 7

An expression with both variables and constants combined by operations.


Rules for writing:

  • We write 5x instead of 5 × x (the multiplication sign is left out between a number and a variable).
  • We write x instead of 1x (the coefficient 1 is not written).
  • We write −x instead of −1x.

Derivation and Proof

Why do we need variables?


Without variables (arithmetic):

  1. "5 plus 3 equals 8." This is one specific statement about specific numbers.
  2. "7 plus 2 equals 9." Another specific statement.
  3. "12 plus 8 equals 20." Another one.

With variables (algebra):

  1. We can write a general rule: a + b = b + a (addition can be done in any order).
  2. This single statement covers ALL numbers, not just one pair.
  3. Variables let us write general rules that work for every number.

Real-life need for variables:

  1. A shopkeeper sells pencils at Rs 5 each. How much do n pencils cost?
  2. Without variables: you need a separate calculation for 1 pencil, 2 pencils, 3 pencils...
  3. With variables: Cost = 5n. Now plug in any value of n to get the answer.
  4. n = 1 → Cost = 5. n = 10 → Cost = 50. n = 100 → Cost = 500.

Variables let us write one rule instead of many separate calculations.

Types and Properties

Where variables and constants appear:


1. In matchstick patterns:

  • To make 1 triangle, you need 3 matchsticks.
  • To make 2 triangles in a row, you need 5 matchsticks.
  • To make 3 triangles in a row, you need 7 matchsticks.
  • For n triangles: matchsticks needed = 2n + 1.
  • Here, n is a variable (it changes) and 2 and 1 are constants.

2. In word problems:

  • "Asha is 3 years older than Binu." If Binu's age = x, then Asha's age = x + 3.
  • x is a variable (Binu's age changes every year). 3 is a constant (the gap between their ages stays the same).

3. In formulas:

  • Perimeter of a square = 4s, where s = side (variable), 4 = constant.
  • Area of a rectangle = l × b, where l and b are variables.

4. In number patterns:

  • Even numbers: 2, 4, 6, 8, ... The general rule is 2n where n = 1, 2, 3, ...
  • Odd numbers: 1, 3, 5, 7, ... The general rule is 2n − 1.

5. In everyday life:

  • Price of x kg of rice at Rs 40 per kg = 40x.
  • Total marks if you score m marks out of 100 = m (variable), total = 100 (constant).

Solved Examples

Example 1: Example 1: Identifying variables and constants

Problem: In the expression 7x + 3, identify the variable(s) and constant(s).


Solution:

  • Variable: x (it can take different values)
  • Constants: 7 and 3 (they are fixed numbers)
  • 7 is the coefficient of x
  • 3 is a constant term

Answer: Variable = x. Constants = 7 and 3.

Example 2: Example 2: Writing expressions using variables

Problem: Write algebraic expressions for: (a) 8 added to a number y. (b) A number p multiplied by 6. (c) 10 subtracted from a number m.


Solution:

  • (a) 8 added to y = y + 8
  • (b) p multiplied by 6 = 6p
  • (c) 10 subtracted from m = m − 10

Example 3: Example 3: Using variables for age problems

Problem: Rahul is 5 years older than his sister. If his sister's age is x years, write Rahul's age. Find Rahul's age when his sister is 8, 12, and 15 years old.


Solution:

Expression: Rahul's age = x + 5

When x = 8: Rahul's age = 8 + 5 = 13 years

When x = 12: Rahul's age = 12 + 5 = 17 years

When x = 15: Rahul's age = 15 + 5 = 20 years

Note: x is a variable (it changes), 5 is a constant (the age difference stays the same).

Example 4: Example 4: Cost problem using variables

Problem: A notebook costs Rs 30. Write an expression for the cost of n notebooks. Find the cost for 5, 10, and 25 notebooks.


Solution:

Expression: Cost = 30n

For n = 5: Cost = 30 × 5 = Rs 150

For n = 10: Cost = 30 × 10 = Rs 300

For n = 25: Cost = 30 × 25 = Rs 750

Variable: n (number of notebooks). Constant: 30 (price of each notebook).

Example 5: Example 5: Matchstick pattern

Problem: To make squares in a row using matchsticks: 1 square needs 4 matchsticks, 2 squares need 7, 3 squares need 10. Write a rule using a variable.


Solution:

Find the pattern:

  • 1 square → 4 = 3(1) + 1
  • 2 squares → 7 = 3(2) + 1
  • 3 squares → 10 = 3(3) + 1

For n squares:

  • Matchsticks = 3n + 1

Verify for n = 4:

  • 3(4) + 1 = 13 matchsticks
  • Drawing 4 squares in a row: first square uses 4 sticks, each additional square shares one side, so adds 3 sticks. 4 + 3 + 3 + 3 = 13 ✓

Answer: For n squares, matchsticks needed = 3n + 1.

Example 6: Example 6: Perimeter using variables

Problem: The perimeter of a square is 4 times its side. If the side is s cm, write the perimeter. Find it when s = 6, 10, and 15.


Solution:

Expression: Perimeter = 4s

When s = 6: P = 4 × 6 = 24 cm

When s = 10: P = 4 × 10 = 40 cm

When s = 15: P = 4 × 15 = 60 cm

Variable: s (side length, can be any value). Constant: 4 (a square always has 4 sides).

Example 7: Example 7: Even and odd numbers using variables

Problem: Write the first 5 even numbers and the first 5 odd numbers using the variable n.


Solution:

Even numbers: Rule = 2n

  • n = 1 → 2(1) = 2
  • n = 2 → 2(2) = 4
  • n = 3 → 2(3) = 6
  • n = 4 → 2(4) = 8
  • n = 5 → 2(5) = 10

Odd numbers: Rule = 2n − 1

  • n = 1 → 2(1) − 1 = 1
  • n = 2 → 2(2) − 1 = 3
  • n = 3 → 2(3) − 1 = 5
  • n = 4 → 2(4) − 1 = 7
  • n = 5 → 2(5) − 1 = 9

Example 8: Example 8: Identifying variable, coefficient, and constant term

Problem: In the expression 4y − 9, identify: (a) the variable, (b) the coefficient of the variable, (c) the constant term.


Solution:

  • (a) Variable: y
  • (b) Coefficient of y: 4 (the number multiplied with y)
  • (c) Constant term: −9 (the number that stands alone, without a variable)

Note: The constant term includes its sign. Here it is −9, not 9.

Example 9: Example 9: Real-life constants and variables

Problem: Identify the variable and constant in each situation: (a) Number of days in a week. (b) Your score in the next maths test. (c) The number of wheels on a car. (d) The number of students present in class each day.


Solution:

  • (a) Days in a week = 7. This is a constant (always 7).
  • (b) Your score in the next test. This is a variable (you do not know it yet, it can change).
  • (c) Wheels on a car = 4. This is a constant (always 4).
  • (d) Students present each day. This is a variable (it changes every day).

Example 10: Example 10: Forming a rule from a table

Problem: A pattern is given: when x = 1, y = 5. When x = 2, y = 8. When x = 3, y = 11. When x = 4, y = 14. Find the rule connecting x and y.


Solution:

Look at the pattern:

  • x = 1, y = 5 → 5 = 3(1) + 2
  • x = 2, y = 8 → 8 = 3(2) + 2
  • x = 3, y = 11 → 11 = 3(3) + 2
  • x = 4, y = 14 → 14 = 3(4) + 2

Rule: y = 3x + 2

Verify for x = 5: y = 3(5) + 2 = 17. The pattern continues: each time x goes up by 1, y goes up by 3.

Answer: The rule is y = 3x + 2. Here x and y are variables, 3 is the coefficient, and 2 is the constant.

Real-World Applications

Where are variables and constants used?

  • Formulas in maths: Area of rectangle = l × b (l and b are variables). Perimeter of square = 4s. These formulas work for any value of the variable.
  • Science: Speed = Distance/Time. Here distance and time are variables. The formula works for any journey.
  • Shopping: If apples cost Rs 80 per kg, the cost of x kg = 80x. The shopkeeper uses this to bill any quantity.
  • Patterns: To describe number patterns (like 2, 4, 6, 8...), we use 2n where n is a variable. This describes the entire pattern in one rule.
  • Coding and computers: In programming, variables store values that change (like a player's score in a game), and constants store fixed values (like the maximum score).
  • Temperature conversion: The formula C = (5/9)(F − 32) uses variables C and F and constants 5, 9, and 32.

Key Points to Remember

  • A variable is a letter (like x, y, n) that represents a number that can change or is unknown.
  • A constant is a number with a fixed value (like 5, 100, π).
  • In the expression 3x + 7: x is the variable, 3 is the coefficient of x, and 7 is the constant term.
  • Variables let us write general rules that work for many values, not just one.
  • The same variable can take different values in different problems.
  • Constants never change their value.
  • We write 5x instead of 5 × x (the × sign is left out).
  • We write x instead of 1x (coefficient 1 is not written).
  • Variables are used in patterns, formulas, equations, and real-life problems.
  • Understanding variables is the foundation of algebra.

Practice Problems

  1. Identify the variables and constants in: 9m + 4.
  2. Write an expression for: 'a number t decreased by 12.'
  3. A pen costs Rs 15. Write the cost of p pens. Find the cost of 7 pens.
  4. Neha is twice as old as her brother. If her brother's age is y, write Neha's age. Find it when y = 5 and y = 9.
  5. For a pattern of triangles in a row: 1 triangle needs 3 matchsticks, 2 need 5, 3 need 7. Write the rule for n triangles.
  6. Classify as variable or constant: (a) number of months in a year, (b) daily temperature, (c) number of legs on a spider, (d) your weight.
  7. In the expression 6a − 2b + 11, name all variables, coefficients, and the constant term.
  8. Write the rule for the pattern: 4, 7, 10, 13, 16, ... using a variable n.

Frequently Asked Questions

Q1. What is a variable in maths?

A variable is a letter or symbol (like x, y, or n) that stands for a number whose value can change or is not known yet. For example, if you do not know how many pencils you have, you can call it n.

Q2. What is a constant in maths?

A constant is a number with a fixed value that does not change. Examples: 5, 100, 3.14 (pi). The number of days in a week (7) is a constant because it never changes.

Q3. What is the difference between a variable and a constant?

A variable can take different values — its value changes or is unknown. A constant has one fixed value that never changes. In the expression 4x + 9, x is a variable (can be any number) and 4, 9 are constants (always the same).

Q4. What is a coefficient?

A coefficient is the constant number multiplied with a variable. In 7x, the coefficient of x is 7. In 3y + 5, the coefficient of y is 3. If a variable has no number in front (like x), its coefficient is 1.

Q5. Why do we use variables?

Variables let us write general rules and formulas that work for many values. Instead of calculating separately for each number, we write one expression. For example, 'cost of n apples at Rs 10 each = 10n' works for any value of n.

Q6. Can a variable be any letter?

Yes. Any letter can be used as a variable — x, y, z, a, b, m, n, p, etc. We usually pick a letter that makes sense: t for time, d for distance, n for number of items, s for side length.

Q7. Is pi a constant or a variable?

Pi (π = 3.14159...) is a constant. Its value is fixed and never changes. Even though its decimal goes on forever, the value is definite.

Q8. Can 0 be a variable?

No. 0 is a fixed number — it is always 0. So it is a constant. A variable must be a letter or symbol that can take different values.

Q9. What is a constant term?

A constant term is a number in an expression that stands alone (not multiplied by a variable). In 5x + 3, the constant term is 3. In 2y − 7, the constant term is −7.

Q10. Can an expression have more than one variable?

Yes. For example, area of a rectangle = l × b has two variables (l and b). The expression 3x + 2y − 5 has two variables (x and y) and one constant term (−5).

We are also listed in