Welcome back! In our last lesson, we focused on manipulating individual algebraic expressions like polynomials and rational functions. These skills are the building blocks for solving equations. Now, we will take a significant step forward by learning how to work with multiple equations simultaneously.
This lesson addresses a fundamental concept in mathematics and a cornerstone of machine learning: systems of linear equations. Many problems in ML, from simple linear regression to the internal workings of neural networks, involve solving for multiple unknown parameters at once. Today, you will learn the two most common algebraic methods for doing this: substitution and elimination. Mastering these techniques will not only solidify your algebra skills but also lay the groundwork for linear algebra, which we will explore in depth later in the course.
What is a System of Linear Equations?
A system of linear equations is simply a collection of two or more linear equations that share the same variables. A "solution" to such a system is a set of values for the variables that makes all of the equations in the system true at the same time.
For a system with two variables, like and , each linear equation represents a line on a graph. The solution to the system is the point where these lines intersect.

There are three possibilities for the solution to a system of linear equations:
- One unique solution: The lines intersect at a single point. This is called a consistent and independent system.
- No solution: The lines are parallel and never intersect. This is an inconsistent system.
- Infinitely many solutions: The equations represent the same line. Every point on the line is a solution. This is a consistent and dependent system.
To build a solid intuition for these concepts, please read the introductory sections of the following resource from OpenStax.
11.1: Systems of Linear Equations - Two Variables
This reading will formally define the types of linear systems and illustrate their graphical interpretations.
Please read the first three subsections: "Introduction to Systems of Equations", "Types of Linear Systems", and "Solving Systems of Equations by Graphing". Pay close attention to the vocabulary (independent, dependent, inconsistent) and how the graphical representation of the lines corresponds to each type of solution.
While graphing is a great way to visualize what's happening, it's not always precise, especially if the solution involves fractions or complex decimals. For that, we need robust algebraic methods.
Solving Systems by Substitution
The substitution method is an intuitive algebraic approach. The core idea is to solve one equation for one variable and then substitute that expression into the other equation. This reduces a system of two equations with two variables down to a single equation with one variable, which we can then easily solve.
The following video provides a clear walkthrough of both substitution and elimination. We will focus on substitution first.
Solving Systems of Equations By Elimination & Substitution With 2 Variables
This video from The Organic Chemistry Tutor demonstrates the substitution method with several examples, starting with the simplest case and moving to more general ones.
Please watch the section on the substitution method, which covers three examples: A simple case where one variable is already isolated. A special case where both equations are solved for y. A general case where you must first solve for a variable.
The general steps for the substitution method are:
- Solve one of the equations for one of its variables (e.g., solve for in terms of ). Choose an equation where a variable has a coefficient of 1 or -1 to make this step easier.
- Substitute the expression from step 1 into the other equation. This will give you an equation with only one variable.
- Solve the resulting equation for that variable.
- Substitute the value you found in step 3 back into one of the original equations (or the expression from step 1) to find the value of the other variable.
- Verify your solution by plugging the values for both variables into both original equations to ensure they hold true.
This method can be extended to systems with more variables. For a system of three equations, you would solve for one variable, substitute it into the other two equations, and you'd be left with a familiar 2x2 system to solve.
Solving Systems by Elimination (or Addition)
The elimination method, sometimes called the addition method, works by manipulating the equations so that when you add them together, one of the variables is eliminated.
The key is to make the coefficients of one variable in two different equations exact opposites (e.g., and ). Often, this requires you to multiply one or both equations by a constant.
The following video is dedicated to the elimination method and is an excellent resource for mastering this technique, including its application to 3-variable systems.
Elimination Method For Solving Systems of Linear Equations Using Addition and Multiplication, Algebr
This video from The Organic Chemistry Tutor provides a focused tutorial on the elimination method. It clearly explains the strategy for both two-variable and three-variable systems.
Please watch the video to understand the different scenarios: Basic elimination where a variable cancels immediately upon adding. Elimination requiring multiplication to create opposite coefficients. Solving a 3-variable system by reducing it to a 2-variable system. This is a crucial skill.
The strategy for solving a system with three variables, say , using elimination is a great example of breaking a complex problem into smaller, manageable parts:
- Pair up two of the equations (e.g., the first and second) and use elimination to get rid of one variable (say, ). This leaves you with one new equation in terms of and .
- Pair up a different combination of equations (e.g., the first and third) and eliminate the same variable (). This gives you a second new equation in terms of and .
- You now have a 2x2 system with your two new equations. Solve this system for and using either elimination or substitution.
- Back-substitute the values of and that you just found into any of the original three equations to solve for .
Handling Special Cases: Inconsistent and Dependent Systems
When you apply these algebraic methods, the results will clearly tell you which of the three solution types you are dealing with.
[PDF] 8.1 & 8.2 Systems of Linear equations: Substitution and Elimination
This document provides a concise summary of how to interpret the results when solving a system.
In the document, find the section "Elimination (addition) method". Read the "Remark" at the end of that section. It explains what happens when you get a statement that is always true (like 0=0) or always false (like 0=5). Then, briefly look at the example titled "(Infinitely many solutions)" to see how a general solution is expressed for a dependent system.
To summarize:
- If your process leads to a false statement (e.g., ), it is a contradiction. This means there is no solution, and the system is inconsistent.
- If your process leads to an identity (e.g., ), it means the equations are redundant. There are infinitely many solutions, and the system is dependent. You can express the solution set by writing one variable in terms of the other (e.g., , so the solution is ).
Conclusion
In this lesson, we established a solid foundation for solving systems of linear equations. You learned to classify systems based on their number of solutions and how this relates to their graphical interpretation. Most importantly, you learned the step-by-step algebraic techniques of substitution and elimination, which allow for precise solutions to systems of any size.
Key Takeaways:
- A system of linear equations can have one unique solution, no solution, or infinitely many solutions.
- The substitution method involves isolating one variable and substituting its expression into another equation.
- The elimination method involves manipulating and adding equations to eliminate a variable.
- For systems with three or more variables, the strategy is to systematically eliminate variables to reduce the problem to a smaller, solvable system.
- Contradictions (like ) imply no solution, while identities (like ) imply infinite solutions.
In our next lesson, we will step into a different but equally fundamental area of mathematics: set theory. While it might seem like a change of pace, sets are the language used to formally define mathematical objects and concepts, including the solution sets you worked with today, the domains of functions, and the sample spaces used in probability. A solid grasp of set theory will provide the formal language needed for the advanced topics to come.