Linear Equation Solver: ax + b = c
Use this calculator to solve for 'x' in a linear equation of the form ax + b = c. Enter the coefficients and constants, and the calculator will provide the step-by-step solution.
Understanding Linear Equations
A linear equation is an algebraic equation in which each term has an exponent of one and the graphing of the equation results in a straight line. The most common form for a single-variable linear equation is ax + b = c, where:
xis the variable you are solving for.ais the coefficient ofx(it multipliesx).bis a constant term.cis another constant term on the other side of the equation.
The goal when solving a linear equation is to isolate the variable x on one side of the equation.
How to Solve ax + b = c (Step-by-Step)
To solve an equation of the form ax + b = c, you typically follow these steps:
- Isolate the term with 'x': Subtract the constant
bfrom both sides of the equation. This moves the constant term away from the variable term.ax + b - b = c - bax = c - b - Isolate 'x': Divide both sides of the equation by the coefficient
a. This will leavexby itself.ax / a = (c - b) / ax = (c - b) / a
It's important to remember that whatever operation you perform on one side of the equation, you must perform the same operation on the other side to maintain equality.
Examples of Linear Equations
Let's look at a few examples:
Example 1: Simple Positive Values
Solve: 2x + 5 = 15
- Subtract 5 from both sides:
2x = 15 - 5→2x = 10 - Divide by 2:
x = 10 / 2→x = 5
Example 2: Including Negative Values
Solve: -3x + 7 = 1
- Subtract 7 from both sides:
-3x = 1 - 7→-3x = -6 - Divide by -3:
x = -6 / -3→x = 2
Example 3: Fractional Result
Solve: 4x - 3 = 8
- Add 3 to both sides:
4x = 8 + 3→4x = 11 - Divide by 4:
x = 11 / 4→x = 2.75
Use the calculator above to practice solving these and other linear equations!
Step-by-Step Solution:
"); steps.push("Given equation:" + a + "x + " + b + " = " + c + "");
// Step 1: Subtract 'b' from both sides
var c_minus_b = c – b;
steps.push("Step 1: Subtract " + b + " from both sides to isolate the 'x' term.");
steps.push("" + a + "x + " + b + " - " + b + " = " + c + " - " + b + "");
steps.push("Simplifies to: " + a + "x = " + c_minus_b + "");
// Step 2: Divide by 'a'
if (a === 0) {
if (c_minus_b === 0) {
solution = "Result: Infinite Solutions";
steps.push("Step 2: Since the coefficient 'a' is 0 and the right side is also 0 (0x = 0), there are infinite solutions for x.");
} else {
solution = "Result: No Solution";
steps.push("Step 2: Since the coefficient 'a' is 0 but the right side is not 0 (0x = " + c_minus_b + "), there is no solution for x.");
}
} else {
var x = c_minus_b / a;
steps.push("Step 2: Divide both sides by " + a + " to solve for 'x'.");
steps.push("" + a + "x / " + a + " = " + c_minus_b + " / " + a + "");
steps.push("Simplifies to: x = " + x.toFixed(4) + ""); // Format to 4 decimal places
solution = "Final Solution: x = " + x.toFixed(4) + "";
}
resultDiv.innerHTML = steps.join("") + solution;
}