Linear Combination Calculator
Enter the six coefficients of your two-equation system and the calculator solves for x and y using the linear combination (elimination) method. You get the answer instantly, plus a step-by-step panel that shows every multiplication, addition and substitution as the numbers update. The calculator also detects when the system has infinitely many solutions or no solution at all.
Formula
Worked example
For 2x + 3y = 8 and 5x - y = 7: det = 2*(-1) - 5*3 = -2 - 15 = -17. x = (8*(-1) - 7*3)/(-17) = (-8 - 21)/(-17) = -29 / -17 = 29/17. y = (2*7 - 5*8)/(-17) = (14 - 40)/(-17) = -26 / -17 = 26/17.
What is the linear combination method?
The linear combination method (also called the elimination method) is a technique for solving a system of two linear equations in two unknowns. The core idea is to multiply each equation by a chosen number so that the coefficient of one variable becomes identical in both equations. You then add or subtract the equations to eliminate that variable, leaving a single equation with only one unknown, which you solve directly. Substitute that value back into either original equation to find the second variable. This approach is especially practical when the coefficients are whole numbers and one variable cancels naturally without any scaling - for example, when the same number appears with opposite signs in the two equations.
How the calculator solves a 2x2 system
The calculator uses Cramer's Rule, which is mathematically equivalent to the elimination steps but faster to compute. Given a1*x + b1*y = c1 and a2*x + b2*y = c2, the coefficient matrix is [[a1, b1], [a2, b2]] and its determinant is det = a1*b2 - a2*b1. If the determinant is non-zero, there is exactly one solution: x = (c1*b2 - c2*b1) / det and y = (a1*c2 - a2*c1) / det. If the determinant is zero, the lines are either identical (infinitely many solutions) or parallel (no solution). The step-by-step panel traces the equivalent hand-elimination path so you can follow along or check the method for class.
Vector linear combinations
In linear algebra, a linear combination is not just a technique for solving equations - it is a fundamental operation on vectors. A linear combination of two vectors v1 and v2 with scalars s1 and s2 produces a new vector s1*v1 + s2*v2, computed by scaling each vector and adding corresponding components. Every point in the plane can be expressed as a linear combination of two non-parallel vectors; this is what it means for two vectors to span the plane. Switching to vector mode in this calculator lets you explore how different scalar values stretch, compress, and combine vectors in 2D or 3D space.
Special cases: infinite and no-solution systems
When the determinant equals zero, the two lines defined by the equations are either parallel or identical. If the equations are consistent - one is a scalar multiple of the other in every coefficient including the constant - the lines coincide and every point on the line is a valid solution: there are infinitely many. If the equations are inconsistent - the coefficient ratios match but the constant ratio does not - the lines are parallel and never meet, so no pair (x, y) satisfies both at once. Recognising these cases before solving saves time: check whether a1/a2 equals b1/b2. If it does and also equals c1/c2, you have infinitely many solutions; if it does but the constant ratio differs, there is no solution.
Determinant and solution type
| Determinant | Solution type | Geometric meaning |
|---|---|---|
| Non-zero | Unique solution | Lines intersect at exactly one point |
| Zero, consistent | Infinitely many solutions | Lines coincide (same line) |
| Zero, inconsistent | No solution | Lines are parallel and never meet |
The determinant of the 2x2 coefficient matrix fully determines the number and nature of solutions.
Frequently asked questions
What is a linear combination in math?
A linear combination is an expression formed by multiplying each item in a set by a scalar (a constant number) and then adding all the results. For equations, the method eliminates one variable to make a two-unknown problem solvable with simple arithmetic. For vectors, it produces a new vector by scaling and summing the original vectors. The phrase "linear" refers to the fact that each term involves a single power of the variable or vector, not squares, cubes or other non-linear terms.
When should I use the linear combination method instead of substitution?
The linear combination (elimination) method works best when the coefficients of one variable in the two equations are already equal, opposite, or easy to make equal by multiplying by small integers. Substitution tends to be cleaner when one equation already expresses a variable on its own - for example, y = 3x + 1 - because you can plug it into the other equation with minimal algebra. For coefficients like 7 and 11 with no obvious relationship, elimination often produces messier numbers and substitution may be quicker.
What does the determinant tell me about the system?
The determinant of the coefficient matrix is the number det = a1*b2 - a2*b1. A non-zero determinant means the two equations represent lines with different slopes, so they cross at exactly one point and the system has a unique solution. A determinant of zero means the lines are either parallel (no solution) or the same line (infinitely many solutions). In that case, compare the ratios of the constants to tell them apart.
Can this calculator handle fractions or decimals?
Yes. All six coefficient fields accept any real number, including decimals and negative values. When the exact solution happens to be a simple fraction (such as 3/5 or -7/4), the result panel shows it in fraction form. When a decimal representation is shorter, it shows the decimal trimmed to the number of significant figures needed for accuracy.
What are the limitations of this calculator?
This tool solves systems of exactly two linear equations in two unknowns (2x2 systems). For systems with three or more equations, you would need a 3x3 or larger solver. It also does not handle inequalities, quadratic equations, or systems where the unknowns appear in non-linear forms such as x*y or x^2. For those, try a full system-of-equations or polynomial solver.
How do I check that my answer is correct?
Substitute your values of x and y back into each original equation and confirm that the left-hand side equals the right-hand side. For example, if x = 2 and y = 1, and your first equation was 3x + y = 7, check that 3*2 + 1 = 7, which it does. If even one equation fails the check, you made an error somewhere in the elimination or substitution step. This calculator performs that verification automatically in the steps panel.