Arte SheetsLearn. Try. Understand.

Math & Trig

Solve a system of two linear equations (Cramer's Rule formula)

Solve a1*x + b1*y = c1 and a2*x + b2*y = c2 directly in cells using determinants and guard parallel or redundant lines where det = 0.

Determinant solution for resource-mix and blending equations

Suppose Desk X uses 2 CNC hours + 4 Finishing hours and Chair Y uses 3 CNC hours + 1 Finishing hour, and you want to exhaust 26 CNC hours (2x + 3y = 26) and 22 Finishing hours (4x + 1y = 22).

By Cramer's Rule, determinant D = a1*b2 - b1*a2. Whenever D <> 0, the unique intersection is x = (c1*b2 - b1*c2) / D and y = (a1*c2 - c1*a2) / D. If D = 0, the two equations are parallel or identical and have no unique solution.

ConstraintCoeff x (A)Coeff y (B)RHS Total (C)
CNC Hours (Row 2)2326 (2*4 + 3*6 = 26)
Finishing Hours (Row 3)4122 (4*4 + 1*6 = 22)
DeterminantsD = -10Dx = -40 (x = 4)Dy = -60 (y = 6)

Zero-determinant safe formulas for x and y

Compute determinant D once inside LET so singular (parallel) equations return a clear diagnostic string instead of #DIV/0!.

=LET(d, A2*B3 - B2*A3, IF(d=0, "No unique solution", ROUND((C2*B3 - B2*C3) / d, 4)))

Solve for variable y

Replace the y-column coefficients with the right-hand-side constants C2 and C3 in the numerator.

=LET(d, A2*B3 - B2*A3, IF(d=0, "No unique solution", ROUND((A2*C3 - C2*A3) / d, 4)))

Inputs and interpretation

Zero determinant means no unique solution, including degenerate equations. Near-zero determinants can amplify numerical error; exact equality with zero is not a general conditioning test. This rounded demonstration does not enforce nonnegative or integer production quantities. Keep unrounded results when checking residuals.

Try the example

Use the original values or change them to test your understanding.

Further reading