If you have ever stared at an equation like \( 3x - 4 = 11 \) and wondered what that lonely x is hiding, you are in exactly the right place. The letter \( x \) is not a secret code or a trick — it is simply a placeholder for a number we do not know yet. Our job is to figure out what number it stands for, and there is a reliable, repeatable method for doing it every single time.
In this beginner’s guide, you will learn how to solve for x from the ground up: what the phrase actually means, the one golden rule that keeps equations honest, and a clear step-by-step process you can apply to almost any problem. We will work through five complete examples — showing every step — and point out the small mistakes that trip up most students. If you ever want to check your work in seconds, you can paste any equation into our free equation solver and see the full solution laid out for you.
This guide is written for students from middle school through early college, as well as parents helping at the kitchen table. No prior algebra experience is assumed. Take it one section at a time, try the examples yourself before reading the solution, and by the end you will solve for \( x \) with confidence.
What Does “Solve for X” Mean?
An equation is a mathematical sentence that says two things are equal, joined by an equals sign. For example, \( x + 7 = 12 \) says “some number plus seven equals twelve.”
The letter \( x \) is called a variable because its value can vary — until an equation pins it down. To solve for x means to rearrange the equation so that \( x \) sits alone on one side, with a clean number on the other side. When you reach something like \( x = 5 \), you have solved it.
Key idea
Solving for \( x \) is the process of isolating the variable — getting \( x \) by itself on one side of the equals sign. Everything else in this guide is just a careful way of doing that.
Mathematicians often use \( x \), but the variable could be any letter — \( y \), \( n \), \( t \), or even a question mark. The method is identical no matter which symbol you see.
The Golden Rule: Keep the Equation Balanced
Picture an equation as an old-fashioned balance scale. The equals sign is the center, and both sides must always weigh the same. This leads to the single most important rule in algebra:
The golden rule of equations
Whatever you do to one side of the equation, you must do the exact same thing to the other side. Add, subtract, multiply, or divide — both sides, every time.
Why does this work? Because if two quantities are equal and you change them in identical ways, they stay equal. If \( a = b \), then \( a + 3 = b + 3 \), and \( a \div 2 = b \div 2 \), and so on. Keeping the scale balanced is what lets us safely peel away everything around \( x \).
Inverse Operations: Your Main Tool
To get \( x \) alone, we “undo” the operations attached to it using their opposites, called inverse operations. Addition and subtraction undo each other; multiplication and division undo each other. Here is a quick reference:
| If x is being… | Undo it with… | Example |
|---|---|---|
| Added to (+) | Subtraction (−) | \( x + 4 \rightarrow \) subtract 4 |
| Subtracted from (−) | Addition (+) | \( x - 4 \rightarrow \) add 4 |
| Multiplied (×) | Division (÷) | \( 5x \rightarrow \) divide by 5 |
| Divided (÷) | Multiplication (×) | \( \dfrac{x}{5} \rightarrow \) multiply by 5 |
| Squared (\( x^2 \)) | Square root (\( \sqrt{\ } \)) | \( x^2 \rightarrow \) take the square root |
Notice that you typically undo operations in the reverse order of the order of operations (PEMDAS). When solving, you peel away addition and subtraction first, then multiplication and division — the opposite of how you would evaluate an expression.
How to Solve for X: A Step-by-Step Method
Here is a dependable recipe for how to solve for x in most linear equations. You will not always need every step, but following the order keeps you organized.
- Simplify each side separately. Distribute any parentheses and combine like terms before you start moving things across the equals sign.
- Gather the variable terms on one side. If \( x \) appears on both sides, add or subtract to collect all \( x \) terms together.
- Move the constants to the other side. Add or subtract numbers so the \( x \) term is alone on its side.
- Undo multiplication or division. Divide (or multiply) both sides by the number in front of \( x \), called the coefficient.
- Check your answer. Substitute your value back into the original equation and confirm both sides match.
Study tip
Always write each new line directly under the previous one, with the equals signs lined up in a column. Neat, vertical work makes errors easy to spot and easy to fix.
Worked Examples (Every Step Shown)
Now let’s put the method to work. Try each problem on paper first, then compare with the solution.
Example 1: A One-Step Equation
Solve: \( x + 7 = 12 \)
The variable \( x \) has a \( 7 \) added to it. To undo addition, we subtract \( 7 \) from both sides:
$$ x + 7 - 7 = 12 - 7 $$ $$ x = 5 $$Check: substitute \( x = 5 \) into the original equation: \( 5 + 7 = 12 \). True, so the answer is correct.
Example 2: A Two-Step Equation
Solve: \( 3x - 4 = 11 \)
Here \( x \) is multiplied by \( 3 \), and then \( 4 \) is subtracted. We undo in reverse order: first deal with the subtraction, then the multiplication.
Step 1 — undo the subtraction. Add \( 4 \) to both sides:
$$ 3x - 4 + 4 = 11 + 4 $$ $$ 3x = 15 $$Step 2 — undo the multiplication. Divide both sides by \( 3 \):
$$ \frac{3x}{3} = \frac{15}{3} $$ $$ x = 5 $$Check: \( 3(5) - 4 = 15 - 4 = 11 \). Correct.
Stuck on a two-step problem and want to confirm your steps? Drop the equation into our step-by-step math solver and watch the full worked solution appear instantly.
Example 3: Parentheses and Variables on Both Sides
Solve: \( 2(x + 3) = 4x - 6 \)
This one looks busier, but the method still works. First we simplify the left side.
Step 1 — distribute. Multiply the \( 2 \) by each term inside the parentheses:
$$ 2x + 6 = 4x - 6 $$Step 2 — gather the variable terms. Subtract \( 2x \) from both sides to move the \( x \) terms to the right:
$$ 2x + 6 - 2x = 4x - 6 - 2x $$ $$ 6 = 2x - 6 $$Step 3 — move the constant. Add \( 6 \) to both sides:
$$ 6 + 6 = 2x - 6 + 6 $$ $$ 12 = 2x $$Step 4 — undo the multiplication. Divide both sides by \( 2 \):
$$ \frac{12}{2} = \frac{2x}{2} $$ $$ 6 = x $$It is perfectly fine for \( x \) to end up on the right. We can simply read it as \( x = 6 \).
Check: left side \( 2(6 + 3) = 2(9) = 18 \); right side \( 4(6) - 6 = 24 - 6 = 18 \). Both equal \( 18 \), so it checks out.
Example 4: An Equation With a Fraction
Solve: \( \dfrac{x}{4} + 2 = 5 \)
Here \( x \) is divided by \( 4 \), then \( 2 \) is added. We undo the addition first.
Step 1 — subtract 2 from both sides:
$$ \frac{x}{4} + 2 - 2 = 5 - 2 $$ $$ \frac{x}{4} = 3 $$Step 2 — undo the division by multiplying both sides by 4:
$$ \frac{x}{4} \times 4 = 3 \times 4 $$ $$ x = 12 $$Check: \( \dfrac{12}{4} + 2 = 3 + 2 = 5 \). Correct.
Example 5: Turning a Word Problem Into an Equation
Problem: A number is tripled, and then \( 5 \) is added to the result. The total is \( 26 \). What is the number?
First, translate the words into algebra. Let \( x \) be the unknown number. “Tripled” means \( 3x \), and “5 is added” gives \( 3x + 5 \). The total is \( 26 \), so:
$$ 3x + 5 = 26 $$Step 1 — subtract 5 from both sides:
$$ 3x = 21 $$Step 2 — divide both sides by 3:
$$ x = 7 $$Check: tripling \( 7 \) gives \( 21 \), and \( 21 + 5 = 26 \). Correct.
Word problems are just regular equations in disguise. The hardest part is the translation; once you have the equation, the same five steps carry you home.
Common Mistakes to Avoid
Most errors when solving for \( x \) come from a handful of slip-ups. Watch for these:
Changing only one side
If you subtract \( 4 \) from the left, you must subtract \( 4 \) from the right too. Forgetting to balance both sides is the number one cause of wrong answers.
Sign errors with negatives
When you move a term across the equals sign, its sign flips. In \( 6 = 2x - 6 \), adding \( 6 \) to both sides gives \( 12 = 2x \), not \( 0 = 2x \). Track your plus and minus signs carefully.
Forgetting to distribute fully
In \( 2(x + 3) \), the \( 2 \) multiplies both the \( x \) and the \( 3 \), giving \( 2x + 6 \) — not \( 2x + 3 \). Distribute to every term inside the parentheses.
Two more quick reminders:
- Divide by the whole coefficient. To finish \( 3x = 15 \), divide by \( 3 \), giving \( x = 5 \). Do not stop at \( 3x = 15 \) — that is not solved yet.
- Fractions and decimals are valid answers. If you get \( x = \dfrac{7}{2} \) or \( x = 3.5 \), that is fine. Not every equation has a tidy whole-number solution.
Special Cases: No Solution and Infinite Solutions
Once in a while, the variable disappears entirely while you work. When this happens, look at what remains:
- If you end with a false statement like \( 5 = 8 \), the equation has no solution. No value of \( x \) can make it true.
- If you end with a true statement like \( 6 = 6 \), the equation has infinitely many solutions — every number works.
These cases are rare for beginners, but it helps to recognize them so you do not panic when \( x \) vanishes.
A Quick Summary Table
Here are the examples from this guide at a glance, so you can see the pattern of “undo the operations around \( x \).”
| Equation | Main step(s) | Solution |
|---|---|---|
| \( x + 7 = 12 \) | Subtract 7 | \( x = 5 \) |
| \( 3x - 4 = 11 \) | Add 4, then divide by 3 | \( x = 5 \) |
| \( 2(x+3) = 4x - 6 \) | Distribute, collect \( x \), solve | \( x = 6 \) |
| \( \frac{x}{4} + 2 = 5 \) | Subtract 2, then multiply by 4 | \( x = 12 \) |
| \( 3x + 5 = 26 \) | Subtract 5, then divide by 3 | \( x = 7 \) |
How to Get Better Faster
Solving for \( x \) is a skill, and like any skill it grows with focused practice. A few habits make a big difference:
- Always check your answer by substituting it back in. This single habit catches most mistakes before they cost you points.
- Work slowly and write neatly. Speed comes naturally once accuracy is solid.
- Explain each step out loud or to a study partner. If you can teach it, you understand it.
- Use a solver to verify, not to skip. Solve the problem yourself, then confirm with our tool and study any step you got wrong.
When you are ready to go deeper, build on this foundation with our companion guides: How to Solve Linear Equations Step by Step, How to Solve Quadratic Equations (4 Methods), and How to Solve Systems of Equations (Substitution, Elimination & Graphing).
Conclusion
Solving for \( x \) comes down to one simple idea: isolate the variable by undoing each operation, doing the same thing to both sides, and checking your work at the end. Master that, and equations stop being mysterious. Start with one-step problems, build up to parentheses and fractions, and soon you will handle them without a second thought.
Want to confirm a tricky answer or see a clean, step-by-step breakdown? Try our free equation solver for a complete worked solution, and explore more practical math walkthroughs over on the Math Solver AI blog. Keep practicing, and you will be solving for \( x \) like a pro in no time.
