ΣCALCULATORWizard

𝑥 Algebra Calculator

Solve linear and quadratic equations, factor polynomials, expand with FOIL, and solve 2×2 systems — all with step-by-step solutions

2x + 3 = 7
x² − 5x + 6 = 0
Uses quadratic formula: x = (−b ± √(b²−4ac)) / 2a
x² + 5x + 6
Factors into (mx + n)(px + q) form
(2x + 3)(3x + 4)
FOIL: First · Outer · Inner · Last
Solved via elimination / Cramer's rule
Solution
x = 2

📐 Step-by-Step Solution

Details

How to Solve Linear Equations: ax + b = c

A linear equation is any equation where the variable appears with a power of 1 — no squares, cubes, or higher powers. The standard form ax + b = c has a single solution for x when the coefficient a is non-zero: subtract b from both sides to get ax = c − b, then divide both sides by a to isolate x = (c − b) / a. This two-step process — moving constants to one side and dividing by the coefficient — is the foundation of all algebraic manipulation. When a = 0, the equation either has infinite solutions (if b = c, making it always true) or no solution (if b ≠ c, making it a contradiction). Understanding these edge cases is as important as solving the typical case.

Real-world applications of linear equations are everywhere. If you earn $22 per hour and have already worked enough to earn $66, how many total hours would give you $154 in earnings? Set up 22h = 154 − 66... actually, more naturally: 22h + 66 = 154, so h = (154 − 66) / 22 = 88 / 22 = 4 more hours. Every proportional relationship — unit pricing, speed-distance-time, temperature conversions — can be modeled as a linear equation. The ability to isolate any single variable in a linear relationship is the practical skill that algebra unlocks.

The Quadratic Formula: When Equations Have Squared Terms

A quadratic equation has the form ax² + bx + c = 0 where a ≠ 0. Unlike linear equations which have exactly one solution, quadratics can have two distinct real solutions, one repeated solution, or no real solutions at all — determined entirely by the discriminant Δ = b² − 4ac. When Δ > 0, the square root is real and produces two distinct solutions. When Δ = 0, the ± term vanishes and both solutions collapse to x = −b / 2a. When Δ < 0, the square root of a negative number enters the picture, and solutions exist only as complex numbers involving the imaginary unit i = √−1.

x = (−b ± √(b² − 4ac)) / 2a

The quadratic formula works for every quadratic equation without exception — it's derived by completing the square on the general form ax² + bx + c = 0 and produces exact solutions. For x² − 5x + 6 = 0: a = 1, b = −5, c = 6, Δ = 25 − 24 = 1, x = (5 ± 1) / 2, giving x = 3 and x = 2. You can verify both: 3² − 5(3) + 6 = 9 − 15 + 6 = 0 ✓ and 2² − 5(2) + 6 = 4 − 10 + 6 = 0 ✓. Always verify by substituting solutions back into the original equation — this is the gold standard of checking algebraic work.

Factoring Quadratics: Finding the Hidden Structure

Factoring reverses the multiplication process to express a polynomial as a product of simpler expressions. For ax² + bx + c with a = 1, the strategy is finding two numbers that multiply to c and add to b — then writing (x + p)(x + q) where pq = c and p + q = b. For x² + 5x + 6: find two numbers multiplying to 6 and adding to 5. The pair (2, 3) works: 2 × 3 = 6 and 2 + 3 = 5, so x² + 5x + 6 = (x + 2)(x + 3). When a ≠ 1, the process requires the AC method: find two numbers multiplying to a × c and adding to b, split the middle term, then factor by grouping.

Factoring connects directly to solving: if (x + 2)(x + 3) = 0, then by the Zero Product Property, either x + 2 = 0 or x + 3 = 0, giving x = −2 or x = −3. This is the fastest way to solve factorable quadratics — faster than the quadratic formula. The three most important patterns to memorize are the perfect square trinomial (a + b)² = a² + 2ab + b², the difference of squares a² − b² = (a + b)(a − b), and the sum/difference of cubes. Recognizing these patterns on sight eliminates the need for formula application and dramatically speeds up algebraic work.

FOIL Method: Multiplying Two Binomials

FOIL stands for First, Outer, Inner, Last — the four products that arise when multiplying two binomials (ax + b)(cx + d). First: multiply the first terms of each binomial → ac·x². Outer: multiply the outer terms → ad·x. Inner: multiply the inner terms → bc·x. Last: multiply the last terms → bd. Combine the two middle terms (ad + bc)x to get the final trinomial: acx² + (ad + bc)x + bd. For (2x + 3)(3x + 4): First = 6x², Outer = 8x, Inner = 9x, Last = 12, combined = 6x² + 17x + 12.

FOIL is not a separate rule — it's just the distributive property applied twice. (ax + b)(cx + d) = ax(cx + d) + b(cx + d) = acx² + adx + bcx + bd. Understanding this derivation means you can extend the approach to larger polynomials: (a + b + c)(d + e) requires distributing each term of the first over each term of the second, producing six products rather than four. Recognizing FOIL as applied distribution also makes it easier to verify expansions and to reverse the process (factoring) when given the expanded trinomial.

Systems of Two Equations: Finding the Intersection Point

A system of two linear equations with two unknowns represents two lines in a plane. The solution is the point where the lines intersect — the (x, y) pair satisfying both equations simultaneously. Three scenarios are possible: the lines intersect at exactly one point (unique solution), the lines are parallel and never meet (no solution), or the lines are identical (infinite solutions). Algebraically, these correspond to a non-zero determinant, a determinant of zero with inconsistent constants, and a determinant of zero with consistent constants respectively.

This calculator uses elimination (also called Cramer's Rule for 2×2 systems) to find the solution. Given equations a₁x + b₁y = c₁ and a₂x + b₂y = c₂, the determinant is D = a₁b₂ − a₂b₁. When D ≠ 0, the unique solution is x = (c₁b₂ − c₂b₁) / D and y = (a₁c₂ − a₂c₁) / D. Substitution is the alternative approach — solve one equation for one variable, then substitute into the other. Both methods always yield the same answer; elimination tends to be faster when coefficients are arranged favorably, while substitution shines when one equation is already solved for a variable.

When to Use Each Algebraic Method

Choosing the right method saves significant time. For linear equations, there's really only one method — isolate the variable by inverse operations — but the order matters: clear fractions first by multiplying by the LCD, then eliminate parentheses by distributing, collect like terms on each side, and finally isolate the variable. For quadratics, factoring is fastest when the discriminant is a perfect square and the factors are integers. The quadratic formula works universally but involves more arithmetic. Completing the square is most useful for converting to vertex form y = a(x − h)² + k for graphing purposes.

For systems of equations, elimination works best when coefficients of one variable are equal or opposites (multiply-to-match is needed otherwise). Substitution is best when one equation has an isolated variable like y = 2x + 3. Graphing is useful for visualization and for estimating solutions when exact values aren't required. Matrix methods (row reduction, Gaussian elimination) generalize to larger systems of 3, 4, or more equations and variables, using the same logic but applied systematically to arrays of coefficients.

Common Algebra Mistakes and How to Avoid Them

The most frequent algebra error is incorrect distribution of negatives. The expression −(2x + 3) equals −2x − 3, not −2x + 3 — the negative sign must distribute to every term inside the parentheses, not just the first. Similarly, −(x − 4) = −x + 4, because subtracting a negative yields a positive. This error is especially common when moving terms across the equals sign or when expanding expressions like (x − 3)²: the correct expansion is x² − 6x + 9, not x² − 6x − 9 or x² + 9.

Another extremely common mistake is dividing by a variable before checking whether it could equal zero. If you have x(x − 3) = 0, dividing both sides by x would give x − 3 = 0, so x = 3 — but this loses the solution x = 0 entirely. The Zero Product Property is the correct approach: if a product equals zero, at least one factor must equal zero. A third common error is misapplying the square root operation: if x² = 9, then x = ±3 (both +3 and −3 are solutions), not just x = 3. Forgetting the ± when taking square roots of both sides is one of the most common sources of missing solutions in quadratic problems.

Frequently Asked Questions

How do I solve 2x + 3 = 7?
Subtract 3 from both sides: 2x = 4. Then divide both sides by 2: x = 2. Always verify by substituting back: 2(2) + 3 = 7 ✓. This two-step process — move constants, then divide by the coefficient — works for any linear equation in the form ax + b = c.
What does the discriminant tell me about a quadratic?
The discriminant Δ = b² − 4ac tells you how many real solutions exist. If Δ > 0: two distinct real solutions. If Δ = 0: exactly one real solution (a repeated root, where the parabola just touches the x-axis). If Δ < 0: no real solutions — only complex solutions involving √−1. You can evaluate the discriminant before solving to know what kind of answer to expect.
How do I factor x² + 5x + 6?
Find two numbers that multiply to 6 (the constant) and add to 5 (the x coefficient). The pair 2 and 3 works: 2 × 3 = 6 and 2 + 3 = 5. So x² + 5x + 6 = (x + 2)(x + 3). Verify by FOILing back: (x + 2)(x + 3) = x² + 3x + 2x + 6 = x² + 5x + 6 ✓.
What is FOIL and when do I use it?
FOIL (First, Outer, Inner, Last) is a method for multiplying two binomials: (ax + b)(cx + d). First = ac·x², Outer = ad·x, Inner = bc·x, Last = bd. Combine the outer and inner terms to get the final trinomial. FOIL is just the distributive property applied twice — you use it whenever multiplying two expressions each containing two terms.
Why does a 2×2 system sometimes have no solution?
When two linear equations represent parallel lines, they never intersect and there's no (x, y) pair that satisfies both simultaneously. This happens when the ratios of x and y coefficients are equal but the ratio of constants is different — meaning the lines have the same slope but different y-intercepts. The determinant D = a₁b₂ − a₂b₁ equals zero in this case. If D = 0 and the equations are consistent (essentially the same line), there are infinitely many solutions.
Can solutions to algebra problems be negative or fractional?
Absolutely — x can be any real number: positive, negative, zero, a fraction, or an irrational number like √3. Algebra places no restrictions on what values solutions can take unless the original problem specifies a domain (e.g., "find positive integer solutions only"). When you get a negative or fractional answer, verify it by substituting back into the original equation to confirm it satisfies the equality.