Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Number System and Arithmetic
  • Algebra
  • Set Theory
  • Probability
  • Statistics
  • Geometry
  • Calculus
  • Logarithms
  • Mensuration
  • Matrices
  • Trigonometry
  • Mathematics
Open In App
Next Article:
Algebraic Methods of Solving Pair of Linear Equations in Two Variables
Next article icon

Algebraic Methods of Solving Pair of Linear Equations in Two Variables

Last Updated : 30 May, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

When solving a pair of linear equations in two variables, there are several algebraic methods you can use. Here’s a summary of the most common methods:


Algebraic-Methods-of-Solving-Pair-of-Linear-Equations-in-Two-Variables


Let's imagine a situation, Ankita went to a fair in her village. She wanted to go on rides like the Giant Wheel and play Hoopla (a game in which a ring is thrown on the items kept in a stall, and if the ring covers any object completely, the player gets it).

The number of times she played Hoopla is half the number of rides she had on the Giant Wheel. If each ride on the giant wheel costs Rs 3, and a game of Hoopla costs Rs 4, find out the number of rides she had and how many times she played Hoopla, provided she spent Rs 20.

For solving such kind of problem, the first step is to formulate it in terms of equations. Let x be the number of times Ankita rode on the Giant Wheel and y be the number of times she played Hoopla. The equations become, 

x = 2y, 

3x + 4y = 20.

Can we find the solution to this system of equations? There are several ways of finding solutions, let's look at them in detail.

Pair of Linear Equations in Two Variables

An equation that can be put in the form of ax + by + c = 0, where a, b, and c are real numbers and a and b are both non-zero is called a linear equation in two variables x and y. Geometrically, if all the points satisfying this equation are plotted on the cartesian plane. It represents a line. 

Similarly, a system of two linear equations represents two lines. The solution to that system represents points that satisfy both of the equations. There can be either no point, one point, and infinitely many points. 

One Solution, No Solution, and Infinitely many solutions. 

Algebraic Methods of Solving a Pair of Linear Equations 

There are several methods of solving a system of linear equations algebraically, let's look at two of those methods: 

  • Substitution Method
  • Elimination Method

Let's discuss these methods in detail as follows:

Substitution Method

This method mainly involves two steps: 

Step 1: Find the value of one variable, say y in terms of the other variable, i.e., x from either equation, whichever is convenient.

Step 2: Substitute this value of y in the other equation, and reduce it to an equation in one variable, i.e., in terms of x, which can be solved.

Question: Solve the following system of equations: 

7x – 15y = 2

x + 2y = 3

Solution: 

It can be solved according to the steps explained above, 

We pick an equation to represent value of one variable in terms of others, 

Let's pick, x = 3- 2y (It's also convenient). 

Substitute the value of x in the other equation. 

7(3-2y) -15y = 2 

⇒ 21 - 14y -15y = 2 

⇒ 19 = 29y 

⇒ y = 19/29

Now, the x value becomes x = 3 - 2(19/29) = 3 - (38/29) = 49/29

This solution can also be checked by substituting both the values in these equations. 

Note: We have substituted the value of one variable by expressing it in terms of other variable to solve the problem. That's why this method is called substitution.

Sometimes, as in the Example below, we can get statements with no variable. If this statement is true, we can say that the pair of linear equations has infinitely many solutions. If the statement is false, then the pair of linear equations is inconsistent.

Question: Anuj and Rahul bought some stationery items from the shop. Anuj bought 2 pencils and 3 erasers. The cost of 2 pencils and 3 erasers was Rs 9 and Rahul bought 4 pencils and 6 erasers. The cost of 4 pencils and 6 erasers is Rs 18. Find the cost of each pencil and each eraser.

Solution:

The pair of linear equations that is formed from the above description is,

2x + 3y = 9 

4x + 6y = 18

where x is the cost of a pencil and y is the cost of eraser. 

x = \frac{9  - 3y}{2}

Putting this value in the other equation. 

4(\frac{9 - 3y}{2}) + 6y = 18 \\ 18 - 6y + 6y  = 18 \\ 18 = 18

This statement is true for all values of y. However, we do not get a specific value of y as a solution. Therefore, we cannot obtain a specific value of x. This situation has arisen because both the given equations are the same. Therefore, these equations both have infinitely many solutions. 

Elimination Method

This method mainly involves the following steps: 

  1. Multiply both the equations by some suitable non-zero constants and make the coefficients of one variable (either x or y) numerically equal.
  2. Add or subtract one equation from the other so that one variable gets eliminated. If an equation in one variable is obtained, go to Step 5.
  3. If in Step 2, we obtain a true statement involving no variable, then the original pair of equations has infinitely many solutions.
  4. If in Step 2, we obtain a false statement involving no variable, then the original pair of equations has no solution, i.e., it is inconsistent.
  5. Solve the equation in one variable (x or y) so obtained to get its value.
  6. Substitute this value of x (or y) in either of the original equations to get the value of the other variable.

Question 1: Find all possible solutions of the following system of equations using the elimination method. 

2x + 3y = 8  - (1)

4x + 6y = 7 - (2)

Solution:

Multiply equation (1) by 2 and equation (2) by 1. This will make coefficients of x in both the equations same. Then we get the equations as: 

4x + 6y = 16 

4x + 6y = 7

Subtracting both of the equations, 

we get 0 = 9 

This is false. So, no solution exists for this system of linear equations. 

Question 2: The sum of a two-digit number and the number obtained by reversing the digits is 66. If the digits of the number differ by 2, find the number. How many such numbers are there?

Solution:

Let x and y be the ten's and unit's digit respectively. So the first number can be written as 10x + y is the expanded form(for example 56= 10(6) + 5). 

(10x + y) + (10y + x) = 66, 

i.e⇒ 11(x + y) = 66 

i.e ⇒ x + y = 6

It's also given that the digits differ by 2,

So, either x - y = 2 or y - x = 2. Let's look for both of the cases, 

Case 1: x - y = 2, 

Substituting x = y + 2 in the equation given above, 

y + 2 + y = 6

⇒ 2y = 4 

⇒ y = 2. 

So, x = 4 

Case 2: y - x = 2, 

Substituting y = x + 2, in the equation given above, 

x + y = 6. 

⇒ x + x + 2 = 6 

⇒ 2x = 4

⇒ x = 2

y = 4. 

Cross-Multiplication Method

It is one of the techniques to determine the solution of a linear equation in two variables, it is known to be the quickest method.

Assume a pair of Linear equation: 

a1x + b1y + c1 = 0

a2x + b2y + c2 = 0

By using Cross-multiplication, we can find the values of 'x' and 'y':

x=\frac{(b_{1}c_{2})-(b_{2}c_{1})}{(b_{2}a_{1})-(b_{1}a_{2})}\\y=\frac{(c_{1}a_{2})-(c_{2}a_{1})}{(b_{2}a_{1})-(b_{1}a_{2})}

Derivation for Cross-multiplication

a1x + b1y + c1 = 0 ⇢(1)

a2x + b2y + c2 = 0 ⇢(2)

Multiply with b2 in equation (1) and b1 in equation (2):

a1b2x + b1b2y + c1b2 = 0 ⇢(3)

a2b1x + b1b2y + c2b1 = 0 ⇢(4)

Subtracting equation (4) from equation (3) will provide the values of x and y as,

x=\frac{(b_{1}c_{2})-(b_{2}c_{1})}{(b_{2}a_{1})-(b_{1}a_{2})}\\y=\frac{(c_{1}a_{2})-(c_{2}a_{1})}{(b_{2}a_{1})-(b_{1}a_{2})}

Easy Technique to understand the formulae

Write down coefficients in Original form:

a1     b1     c1

a2     b2     c2

Ignore the Coefficients of x and cross- multiply the remaining coefficients then subtract them:

Thus, the solution of the equation of part one becomes ⇒ \frac{x}{(b_{1}c_{2})-(b_{2}c_{1})}

Now, Ignore the coefficient of y and cross-multiply the remaining terms:

Remember to consider the equation under (-y), The second part of the solution ⇒ \frac{-y}{(a_{1}c_{2})-(a_{2}c_{1})}

For the third part, ignore the coefficients of 1 and cross-multiply the remaining terms and subtract them:

The third part of the equation becomes ⇒ \frac{1}{(a_{1}b_{2})-(a_{2}b_{1})}

Combining all the three parts ⇒ \frac{x}{(b_{1}c_{2})-(b_{2}c_{1})}=\frac{-y}{(a_{1}c_{2})-(a_{2}c_{1})}=\frac{1}{(a_{1}b_{2})-(a_{2}b_{1})}

Question 1: Find the value of the variables satisfying the equation using cross- multiplication method:

2x + 3y = 11

3x + 2y = 9

Solution:

Write equations in general form: 

2x + 3y - 11 = 0

3x + 2y - 9 = 0

Using Cross- multiplication method,

\frac{x}{(b_{1}c_{2})-(b_{2}c_{1})}=\frac{-y}{(a_{1}c_{2})-(a_{2}c_{1})}=\frac{1}{(a_{1}b_{2})-(a_{2}b_{1})}

Put the values of all the coefficients in the formula,

\frac{x}{(3.(-9))-(2.(-11))}=\frac{-y}{(2.(-9))-(3.(-11))}=\frac{1}{(2.2)-(3.3)}

\frac{x}{-5}=\frac{-y}{15}=\frac{1}{-5}

Solving, we get: x=1, y=3

Question 2: Using Cross-multiplication method, solve for x and y:

3x - 4y - 2 = 0

y - 2x - 7 = 0

Solution:

Using the formula: \frac{x}{(b_{1}c_{2})-(b_{2}c_{1})}=\frac{-y}{(a_{1}c_{2})-(a_{2}c_{1})}=\frac{1}{(a_{1}b_{2})-(a_{2}b_{1})}

Substitute the values in the formula: \frac{x}{(-4.(-7))-(-2.(-2))}=\frac{-y}{(3.(-7))-(1.(-2))}=\frac{1}{(3.(-2))-(1.(-4))}

Solving the equation, x=-6, y=-5


Next Article
Algebraic Methods of Solving Pair of Linear Equations in Two Variables

A

anjalishukla1859
Improve
Article Tags :
  • Mathematics
  • School Learning
  • Class 10
  • Algebra
  • Maths-Class-10

Similar Reads

    IBPS Clerk Syllabus of Quantitative Aptitude
    IBPS Clerk Exam 2023 Quantitative Aptitude: Quantitative Aptitude is one of the most significant areas of the IBPS Clerk Exam, with 35 questions for 35 marks. The majority of applicants fear Quantitative Aptitude since it requires a lot of calculation and complicated problems that demand high analyt
    6 min read

    Ratio & Proportion, Percentage

    Ratios and Percentages
    Ratios and Percentages: Comparing quantities is easy, each of the quantities is defined to a specific standard and then the comparison between them takes place after that. Comparing quantities can be effectively done by bringing them to a certain standard and then comparing them related to that spec
    6 min read
    Ratio and Proportion
    Ratio and Proportion are used for comparison in mathematics. Ratio is a comparison of two quantities while Proportion is a comparison of two ratios. When a fraction a/b is written a:b then it is termed as a ratio b. When two ratios let's say a:b and c:d are equal a:b and c:d are said to be proportio
    8 min read

    Average

    Average in Maths
    An average is the middle value of a group of numbers. The average is calculated by adding up all the numbers in a group and dividing the total by how many of numbers there are. The image below shows three rows of apples with 6, 11, and 7 apples, and if we take the average of all three rows, we get 8
    15 min read
    Tricks To Solve Questions On Average
    Average is a basic chapter of arithmetic and is important to solve other Quantitative Aptitude problems. From the ‘average’ chapter many questions are regularly asked in different competitive exams.Way to success:Clear basic concepts, practice, concentration, Accuracy and speed are a must for ‘Avera
    6 min read
    Time and Work - Aptitude Questions and Answers
    Time and Work is one of the most basic concepts in Quantitative Aptitude, which is tested extensively in government exams. Undoubtedly, having a strong background in this topic can give candidates an upper hand and help them to score well in competitive exams. A candidate needs to be aware of the ba
    13 min read

    Time Speed, and Distance

    Mixtures & Allegations

    Mixture and Alligation - Solved Questions and Answers
    Question 1: From a vessel of 20 liters of pure milk, 1 liter is taken out and replaced with water, so as to keep the volume constant at 20 liters. This process is repeated 5 times. Find the percentage of pure milk left in the vessel after 5 replacements. Solution: Here, we need to apply the formula
    3 min read
    Mixture and Alligation | Set 2
    Question 1: 30 litres of a mixture of milk and water contains 10% of water, the water to be added, to make the water content 25% in the new mixture. Find how many litres water will be added? Solution : Water in the 30 litre of mixture = 30 x 10/100 = 3 litres Milk in the mixture = 30 - 3 = 27 litres
    3 min read

    Partnership

    Introduction to Accounting for Partnership
    A partnership generally means a relationship among people sharing a mutual interest. In accountancy, a partnership means a business set up together by two or more persons sharing a common interest to earn profit. The concept of partnership is a solution to the problems of the sole proprietorship, su
    8 min read
    Surface Areas and Volumes
    Surface Area and Volume are two fundamental properties of a three-dimensional (3D) shape that help us understand and measure the space they occupy and their outer surfaces.Knowing how to determine surface area and volumes can be incredibly practical and handy in cases where you want to calculate the
    10 min read

    Bar Graphs, Linear Graphs and Pie Charts

    Bar Graphs and Histograms
    A Bar graph or a Histogram is a tool used for visual representation of data. Representing the data in a bar graphs or histograms, makes it easy to understand the concepts and relationships among data.A Histogram is used to display the distribution of continuous data by grouping values into intervals
    6 min read
    What is Linear Graph? Definition, Equation, Examples
    Linear Graph: A Linear Graph is a graphical representation that discusses the relationship between two or more quantities or variables. In the case of any two variables, the relation between these two variables can be drawn by constructing the table of values if the rule for that relation is mention
    9 min read
    Pie Chart
    Pie chart is a popular and visually intuitive tool used in data representation, making complex information easier to understand at a glance. This circular graph divides data into slices, each representing a proportion of the whole, allowing for a clear comparison of different categories making it ea
    11 min read

    Trigonometry, Height and Distances

    Height and Distance | Applications of Trigonometry
    Height is the measurement of an item in the vertical direction, whereas distance is the measurement of an object in the horizontal direction. Heights and Distances are the real-life applications of trigonometry which is useful to astronomers, navigators, architects, surveyors, etc. in solving proble
    6 min read
    Trigonometric Ratios
    There are three sides of a triangle Hypotenuse, Adjacent, and Opposite. The ratios between these sides based on the angle between them is called Trigonometric Ratio. The six trigonometric ratios are: sine (sin), cosine (cos), tangent (tan), cotangent (cot), cosecant (cosec), and secant (sec).As give
    4 min read
    Trigonometry in Math
    We use trigonometry in many everyday situations, often without even noticing. Construction and Architecture: Trigonometry helps calculate angles and heights when designing buildings, bridges, and roads. For example, architects use it to determine roof slopes or the angle of staircases.Navigation: Pi
    3 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences