Library / Foundations: Maths / FMA-44
Foundations: Maths
Two simultaneous equations: solution for x
Value of x that satisfies two simultaneous linear equations, found with Cramer’s rule from the determinant Δ of the coefficients.
- Ref
- FMA-44
- Rev
- v1
- Field
- Foundations: Maths
- Result
- x
Cramer’s rule solves a pair of linear equations ax + by = e and cx + dy = f using determinants. With Δ = ad − bc, x = (ed − bf)/Δ and y = (af − ec)/Δ. If Δ = 0 the lines are parallel or the same, and there is no single solution.
Value of x that satisfies two simultaneous linear equations, found with Cramer’s rule from the determinant Δ of the coefficients. It fails when Δ is zero, because the two lines are then parallel or the same.
Calculator
- Determinant Δ = ad − bc−3
- Solution for x2
- Solution for y1
- Check: a x + b y (should equal e)5
- Check: c x + d y (should equal f)1
What drives the result
Each variable is moved across its typical range while the others stay at the values above. The longest bar is the key driver.
- For 2x + 1y = 5 and 1x + (−1)y = 1, the determinant is −3 and x = 2, y = 1. Substituting back returns both right-hand sides exactly, which is the check.
- The solution is where two straight lines cross. If the determinant were near zero the lines would be nearly parallel and a small change in any coefficient would move the crossing point a long way.
Chart data as tables
Ranked variables
| Variable | Typical range | Lowest result | Highest result | Swing () | Local step | Change in result |
|---|---|---|---|---|---|---|
| a Coefficient a of x (first equation) | −10 to 10 | −18 | 18 | 36 | +0.4 | −11.8 % |
| e Right-hand side of the first equation | −50 to 50 | −16.33 | 17 | 33.33 | +2 | +33.3 % |
| f Right-hand side of the second equation | −50 to 50 | −15 | 18.33 | 33.33 | +2 | +33.3 % |
| c Coefficient c of x (second equation) | −10 to 10 | −9 | 9 | 18 | +0.4 | −11.8 % |
| b Coefficient b of y (first equation) | −10 to 10 | −3.5 | 5.5 | 9 | +0.4 | −5.88 % |
| d Coefficient d of y (second equation) | −10 to 10 | 1 | 7 | 6 | +0.4 | −9.09 % |
Sweep of Right-hand side of the first equation
| Right-hand side of the first equation | Solution for x |
|---|---|
| −50 | −16.33 |
| −37.5 | −12.17 |
| −25 | −8 |
| −12.5 | −3.833 |
| 0 | 0.3333 |
| 12.5 | 4.5 |
| 25 | 8.667 |
| 37.5 | 12.83 |
| 50 | 17 |
Sweep one variable
Variables and how each one contributes
Solution for x
What the equation gives you. Everything else feeds it.
Coefficient a of x (first equation)
The coefficient of x in the first equation, ax + by = e. Changes x through the determinant and the right-hand sides; the size and sign of the effect depend on the other coefficients, so use the swept values to see it. Raising it by 1 (to 3) moves the result by −25 %, from 2 to 1.5.
Coefficient b of y (first equation)
The coefficient of y in the first equation. Changes x through the determinant and the right-hand sides; the size and sign of the effect depend on the other coefficients, so use the swept values to see it. Raising it by 1 (to 2) moves the result by −12.5 %, from 2 to 1.75.
Coefficient c of x (second equation)
The coefficient of x in the second equation, cx + dy = f. Changes x through the determinant and the right-hand sides; the size and sign of the effect depend on the other coefficients, so use the swept values to see it. Raising it by 1 (to 2) moves the result by −25 %, from 2 to 1.5.
Coefficient d of y (second equation)
The coefficient of y in the second equation. Changes x through the determinant and the right-hand sides; the size and sign of the effect depend on the other coefficients, so use the swept values to see it. Raising it by 1 (to 0) moves the result by −50 %, from 2 to 1.
Right-hand side of the first equation
The right-hand side of the first equation. Changes x through the determinant and the right-hand sides; the size and sign of the effect depend on the other coefficients, so use the swept values to see it. Raising it by 1 (to 6) moves the result by +16.7 %, from 2 to 2.333.
Right-hand side of the second equation
The right-hand side of the second equation. Changes x through the determinant and the right-hand sides; the size and sign of the effect depend on the other coefficients, so use the swept values to see it. Raising it by 1 (to 2) moves the result by +16.7 %, from 2 to 2.333.
Worked example with the values above
- Determinant: Δ = ad − bc = (2)(−1) − (1)(1) = −3.
- Numerator for x: ed − bf = (5)(−1) − (1)(1) = −6.
- x = −6 / −3 = 2.
Assumptions and limits
- The two equations are linear and consistent, with a nonzero determinant.
- Exact arithmetic: if the determinant is very small compared with the coefficients, rounding in the inputs makes the answer very sensitive.
Common mistakes
- Forgetting the minus sign in the determinant: Δ = ad − bc, not ad + bc.
- Solving for x and using the same numerator for y: the numerator for y is af − ec.
Statistics and uncertainty
Errors in the coefficients are magnified by 1/Δ: if the determinant is small compared with the products ad and bc, even rounding errors in the inputs can spoil the answer. Measure or compute the coefficients to more significant figures when Δ is small.
Where it is used
- Solving two unknown forces or currents from two equations.
- Finding where two straight lines intersect.
Maths you need
- Determinant: ad − bc of a two-by-two array
- Linear equation: one with no powers of the unknowns