LINEAR ALGEBRA • SYSTEMS OF LINEAR EQUATIONS & MATRICES

Setting Up Linear Systems

Learn to translate real-world problems into systems of equations you can solve step by step.

Historical Context & Motivation

People have been solving problems with multiple unknowns for thousands of years. Ancient merchants needed to figure out the price of different goods when they only knew the totals of mixed purchases. Farmers needed to divide land into plots of different sizes that added up to a specific area. These everyday challenges led mathematicians to develop systems of linear equations — a set of two or more equations that share the same variables and must all be true at the same time.

The story of linear systems stretches across cultures and centuries. From ancient China to Renaissance Europe, mathematicians kept discovering better ways to organize and solve these problems. Today, linear systems are everywhere — in computer graphics, economics, engineering, and even the algorithms behind your favorite apps.

200 BCE
Ancient China: The Nine Chapters
The Chinese text Jiuzhang Suanshu (Nine Chapters on the Mathematical Art) described methods for solving systems of equations, centuries before similar work appeared in Europe.
628 CE
Brahmagupta's Rules
Indian mathematician Brahmagupta developed general rules for solving linear equations and systems, laying groundwork that would influence algebra worldwide.
1750
Cramer's Rule
Swiss mathematician Gabriel Cramer published a formula for solving systems of linear equations using determinants, giving mathematicians a powerful new tool.
1810
Gauss and Elimination
Carl Friedrich Gauss refined the elimination method (now called Gaussian elimination) for solving large systems, a technique still taught and used in computers today.
Today
Modern Applications
Linear systems power GPS navigation, machine learning, video game physics, economic forecasting, and countless other technologies we rely on every day.

But before you can solve a system, you need to know how to set one up. That means reading a problem, identifying the unknowns, and writing equations that capture all the relationships. This skill — translating words into math — is the focus of this lesson.

Core Principles & Definitions

Before diving into examples, let's nail down the key ideas you'll use every time you set up a linear system. These four principles are your foundation.

1

Linear Equation

An equation where every variable is raised to the first power and there are no products of variables. For example, 2x + 3y = 10 is linear, but x² + y = 5 or xy = 6 are not.
2

System of Equations

Two or more equations that share the same set of variables. A solution must satisfy every equation in the system simultaneously — not just one at a time.
3

Variables (Unknowns)

The quantities you are trying to find. Each unknown gets its own variable name (like x, y, or z). Good variable naming makes your work easier to follow.
4

Constraints

The conditions or relationships described in the problem. Each independent constraint typically becomes one equation. You generally need as many equations as you have unknowns.
KEY TAKEAWAY
Think of a linear system like a detective solving a mystery. Each clue (equation) narrows down the suspects (possible values). One clue might not be enough, but when you combine all the clues together, you can pinpoint the exact answer. The more independent clues you have — up to the number of unknowns — the closer you get to cracking the case.

A key rule to remember: to find a unique solution for n unknowns, you generally need n independent equations. Two unknowns? You need two equations. Three unknowns? Three equations. This is your first checkpoint when setting up any system.

Visualizing a Linear System

One of the best ways to understand a system of two linear equations is to graph both lines on the same coordinate plane. Each equation represents a straight line, and the solution to the system is the point where the lines intersect — the one (x, y) pair that makes both equations true.

The cyan line represents x + y = 8 and the violet line represents x − y = 2. They intersect at the pink point (5, 3), which is the solution that satisfies both equations.

In the diagram above, every point on the cyan line makes the equation x + y = 8 true. Every point on the violet line makes x − y = 2 true. But only the point (5, 3) sits on both lines at the same time. That's why it's the solution to the system. Setting up a system correctly means writing equations whose intersection gives you the answer you're looking for.

💡 Three Possibilities
Two lines in a plane can intersect in exactly one point (one solution), be parallel and never meet (no solution), or be the same line (infinitely many solutions). Your setup determines which case you're dealing with.

Mathematical Framework

Now let's look at the standard forms you'll encounter when writing linear systems. Understanding these forms helps you organize your equations neatly and prepare them for solving.

STANDARD FORM OF A LINEAR EQUATION
ax + by = c
Here, a and b are the coefficients (numbers in front of the variables), x and y are the unknowns, and c is the constant on the right side.
A SYSTEM WITH TWO EQUATIONS
a₁x + b₁y = c₁ a₂x + b₂y = c₂
Both equations use the same variables x and y. The subscripts (₁ and ₂) distinguish the coefficients and constants of each equation.
A SYSTEM WITH THREE UNKNOWNS
a₁x + b₁y + c₁z = d₁ a₂x + b₂y + c₂z = d₂ a₃x + b₃y + c₃z = d₃
For three unknowns, you need three equations. Each equation includes terms for x, y, and z.

When setting up a system, your goal is to get every equation into a clean form like those above. That means all variables go on one side and the constant goes on the other. Once your equations are arranged this way, they're ready for any solving method — substitution, elimination, or matrices.

💡 Tip: Choosing Variable Names
You don't have to use x and y. If the problem is about the number of adult and child tickets, try using a for adults and c for children. Meaningful variable names make it easier to check your work.

The Step-by-Step Setup Process

Setting up a linear system from a word problem follows a reliable process. Once you practice these steps a few times, they become second nature. The diagram below shows the four stages you'll move through every time.

Follow these four steps in order: Read & Identify the unknowns, Define Variables, Find Constraints, and finally Write the Equations.

Let's walk through what each step means in practice. In Step 1, you read the problem carefully and ask yourself: what am I trying to find? The answer to this question tells you how many unknowns you have. In Step 2, you give each unknown a variable name and write a brief description of what it represents. This is important — a variable without a label is easy to confuse.

In Step 3, you look for every relationship the problem gives you. Common phrases like "the total is," "combined they make," "twice as many," or "the difference between" each point to a different equation. Finally, in Step 4, you convert those relationships into algebraic equations and arrange them neatly. Once all your equations are written, the setup is complete.

Common word-problem phrases and their algebraic equivalents
Key Phrase in ProblemMathematical Translation
"The total is 50"x + y = 50
"Twice as many A as B"a = 2b (or a − 2b = 0)
"The difference is 12"x − y = 12
"3 apples and 2 bananas cost $7"3a + 2b = 7
"5 more than y"x = y + 5 (or x − y = 5)

Worked Example

Let's put the four-step process into action with a real problem.

📝 Problem
A school is selling tickets for a play. Adult tickets cost $8 each and student tickets cost $5 each. A total of 200 tickets were sold, and the total revenue was $1,180. How many adult tickets and how many student tickets were sold?
Setting Up the System
1
Step 1 — Read & Identify the UnknownsThe problem asks for two things: the number of adult tickets sold and the number of student tickets sold. That gives us two unknowns, so we'll need two equations.
2
Step 2 — Define VariablesLet a = the number of adult tickets sold. Let s = the number of student tickets sold. We used meaningful letters instead of x and y to keep things clear.
3
Step 3 — Identify the ConstraintsThe problem gives us two pieces of information. Constraint 1: The total number of tickets is 200. Constraint 2: The total revenue is $1,180, with adult tickets at $8 and student tickets at $5.
4
Step 4 — Write the EquationsFrom Constraint 1 (total tickets): a + s = 200. From Constraint 2 (total revenue): each adult ticket contributes $8 and each student ticket contributes $5, so 8a + 5s = 1180.
The system is: a + s = 200 and 8a + 5s = 1,180
5
Step 5 — Verify the SetupWe have 2 unknowns and 2 equations — that's a good sign. Both equations are linear (no squared terms or products of variables). Each equation captures a different piece of information from the problem. Our system is ready to solve! For reference, the answer is a = 60 adult tickets and s = 140 student tickets.
Check: 60 + 140 = 200 ✓ and 8(60) + 5(140) = 480 + 700 = 1,180 ✓

Common Mistakes & How to Avoid Them

Setting up linear systems is all about careful translation from words to math. Here are the most common pitfalls students encounter, along with how to fix them.

Five common setup mistakes and their solutions
Common MistakeWhy It HappensHow to Fix It
Not enough equationsA constraint is missed or the same info is written two waysCount unknowns first, then find that many independent relationships
Mixing up unitsAdding dollars to number of items, or mixing hours and minutesLabel each equation with its units and make sure both sides match
Swapping variablesWriting "x is 3 more than y" as y = x + 3 instead of x = y + 3Plug in simple test numbers to check direction
Forgetting to define variablesJumping straight to writing equationsAlways write "Let x = ..." before any equations
Using non-linear equationsWriting x × y or x² when the relationship is actually linearRe-read the problem. Most word problems at this level describe sums, differences, and multiples — all linear
KEY TAKEAWAY
Think of setting up a system like writing a recipe. If you forget an ingredient (a constraint), the dish won't turn out right. If you accidentally double-list an ingredient (write the same relationship twice), you still don't have enough information. Each equation must bring something new to the table.

Connection to Matrices & Advanced Methods

Once you've mastered setting up linear systems by hand, you'll discover that mathematicians have developed a powerful shorthand for organizing these systems: matrices (a matrix is a rectangular grid of numbers). The same system you write as two equations can be packed into a compact matrix equation.

How equation form and matrix form compare
FeatureEquation FormMatrix Form
Representationa + s = 200 and 8a + 5s = 1180[1 1 | 200] [8 5 | 1180]
Best for...2–3 variables, done by handAny number of variables, including computer solutions
Solving methodsSubstitution, eliminationRow reduction (Gaussian elimination), inverse matrices
ScalabilityGets messy past 3 equationsHandles thousands of equations (with a computer)

The key insight is this: the setup process is the same regardless of how you solve the system. Whether you use substitution, elimination, or matrices, you still need to identify unknowns, define variables, and write correct equations. Master the setup, and you'll be ready for any solving method that comes your way — from Algebra 1 all the way through college-level linear algebra.

🚀 Looking Ahead
In future courses, you'll learn how to represent systems using matrix multiplication (Ax = b), find inverse matrices, and use technology to solve systems with hundreds of variables. All of these advanced tools build directly on the setup skills you're learning now.

Practice Problems

Try these five problems on your own. Focus on the setup — writing the variables and equations — rather than solving. Check your answers afterward.

PROBLEM 1CONCEPTUAL
A system of linear equations has three unknowns. What is the minimum number of equations you would need to find a unique solution? Explain why in one or two sentences.
PROBLEM 2BASIC CALCULATION
Translate this word problem into a system of two equations (you do NOT need to solve it): "The sum of two numbers is 45. One number is 9 more than the other. Find the two numbers."
PROBLEM 3INTERMEDIATE
A coffee shop sells small coffees for $3 and large coffees for $5. On Monday, they sold 120 coffees total and made $460 in coffee sales. Set up a system of equations that could be used to find how many small and large coffees were sold.
PROBLEM 4APPLIED
A boat travels 60 miles downstream (with the current) in 3 hours, and 60 miles upstream (against the current) in 5 hours. Set up a system of equations where b = the speed of the boat in still water and c = the speed of the current, both in miles per hour.
PROBLEM 5CRITICAL THINKING
A student writes this system for a problem: x + y = 30 and 2x + 2y = 60. They claim they have two equations and two unknowns, so the system should have a unique solution. What is wrong with their reasoning? What does this system actually look like graphically?

Lesson Summary

A system of linear equations is a set of two or more equations that share the same variables and must all be true simultaneously. To set one up from a word problem, follow four steps: read and identify the unknowns, define variables with clear labels, find the constraints (the relationships described in the problem), and write the equations in standard form with variables on the left and constants on the right.

Remember the golden rule: for n unknowns, you need n independent equations. Watch out for common pitfalls like mixing up units, swapping variable directions, or writing two equations that are really the same constraint in disguise. A correct setup is the essential first step — whether you solve the system by substitution, elimination, or matrices, it all begins with well-formed equations.

Varsity Tutors • Linear Algebra • Setting Up Linear Systems