Linear Equation Calculator tool

Linear Equation Calculator

Linear equations are the building blocks of algebra.

What is a linear equation solver?

A linear equation solver finds x in ax + b = c or x and y in a 2×2 system. Choose single-equation or system mode, enter coefficients, and read the solution with steps. It warns when a = 0 or when the system determinant is zero.

How to use the Linear Equation Solver

  1. Choose single equation or two-equation system.
  2. Enter a, b, c for ax + b = c.
  3. For systems, fill six coefficients for both lines.
  4. Read x or the ordered pair (x, y).
  5. Review messages when lines are parallel.

About this calculator

Linear equations are the building blocks of algebra. Every equation that looks like 'something times x plus something equals a number' is a linear equation. You solve them daily without thinking: if 3 coffees cost ₹450, each coffee costs ₹150 — that is 3x = 450.

This calculator handles two scenarios. First, single-variable equations like 5x - 3 = 22 where you just need the value of x. Second, systems of two equations with two unknowns (x and y) where two lines intersect at a point. The system solver uses Cramer's rule, which computes determinants to find the intersection without needing to graph anything.

Systems of equations appear everywhere: mixing solutions in chemistry, balancing budgets with constraints, finding where supply meets demand in economics, or computing intersection points in geometry.

For quadratic equations (x squared terms), use the [[quadratic]] calculator. For ratio and proportion problems, the [[ratio]] calculator may be more direct. For matrix operations on larger systems, the standard approach would extend Cramer's rule or use Gaussian elimination.

Formula for linear equations and 2×2 systems

ax + b = c  →  x = (c − b) ÷ a
x = (c₁b₂ − c₂b₁) ÷ (a₁b₂ − a₂b₁) for systems
  • a must be non-zero in single-equation mode
  • System determinant a₁b₂ − a₂b₁ must be non-zero for one solution
  • Parallel lines give no unique solution

Linear equation example: solve 3x + 7 = 22

Set a = 3, b = 7, c = 22. Subtract b: 3x = 22 − 7 = 15. Divide by a: x = 15 ÷ 3 = 5.

System example: 2x + 3y = 8 and 4x − y = 2. Determinant is 2×(−1) − 4×3 = −14. Cramer gives x = 1 and y = 2, which satisfies both equations when substituted.

Check x = 5 in 3x + 7 = 22: 15 + 7 = 22. For the system with x = 1, y = 2, substitute into 2x + 3y to get 2 + 6 = 8 as required.

Common uses

  • Student solving homework: find x in 4x + 7 = 31
  • Finding the intersection point of two lines given their equations
  • Chemistry: solving a mixture problem like 0.3x + 0.5y = 100, x + y = 250
  • Business: finding price and quantity where supply = demand from two linear equations
  • Quick sanity check when doing algebra by hand and wanting verification
  • Teacher generating example problems by entering coefficients and seeing solutions

Frequently asked questions

What if the coefficient of x is zero?

If a = 0, the equation becomes b = c. If b equals c, any value of x works (infinite solutions). If b does not equal c, there is no solution. The calculator detects and explains both cases.

What is Cramer's rule?

A method to solve systems of linear equations using determinants. For two equations, the determinant is a1*b2 - a2*b1. If it is nonzero, x and y have unique values computed by replacing columns with the constant terms. It is faster than substitution or elimination for small systems.

When does a system of two equations have no solution?

When the determinant is zero and the equations are inconsistent (represent parallel lines). Example: x + y = 3 and x + y = 5 are parallel — they never intersect, so no (x,y) pair satisfies both.

Can I solve 3 equations with 3 unknowns here?

Not yet. This calculator handles 1 equation with 1 unknown or 2 equations with 2 unknowns. For 3x3 systems, you would need to extend Cramer

How do I enter a negative coefficient?

Use a negative number in the coefficient field. For example, to solve 2x - 5 = 11, enter a=2, b=-5, c=11. The calculator handles negative values correctly in all positions.

What if my equation looks different, like 2x = 10?

Rewrite it in ax + b = c form. 2x = 10 is the same as 2x + 0 = 10, so enter a=2, b=0, c=10. Similarly, x + 3 = x + 5 would need rearranging first: 0x + 3 = 5 (which has no solution since 3 ≠ 5).

What is the geometric interpretation of solving two equations?

Each linear equation represents a straight line on a graph. Solving the system finds where the two lines cross. One solution = lines intersect at one point. No solution = lines are parallel. Infinite solutions = lines are the same line drawn twice.

Are fractional solutions possible?

Yes. If 2x + 1 = 4, then x = 1.5. The calculator shows solutions with up to 6 decimal places for precision. Most real-world linear equations produce non-integer answers.

Related calculators

Maintained by J Jaya Prakash · Last updated: October 2026