041Mathematics · More about equations

Two-variable linear systems

Two-variable linear systems

Two-variable linear systems · status,x,y

  • 198 bytes
  • COMP mode
01

Worked examples

Example 1

An exhibition sells adult and student tickets at fixed prices. Two adult tickets and three student tickets cost HK$138; three adult tickets and two student tickets cost HK$152. Let an adult ticket cost x dollars and a student ticket y dollars. Find the cost of four adult tickets and five student tickets in Hong Kong dollars.

  1. A.242 HKD
  2. B.248 HKD
  3. C.254 HKD
  4. D.260 HKD
Answer
C HK$254; adult ticket HK$36, student ticket HK$22.
Standard solution (without a calculator)
  1. Form the equations: the ticket definitions give 2x+3y=138 and 3x+2y=152, with x and y in Hong Kong dollars.
  2. Eliminate y: twice the first equation gives 4x+6y=276; three times the second gives 9x+6y=456. Subtract to get 5x=180, so x=36.
  3. Find y: substitute into the first equation: 2×36+3y=138, hence 3y=66 and y=22.
  4. Check uniqueness: 3×36+2×22=108+44=152 also satisfies the second equation. Δ=2×2−3×3=−5≠0, so the solution is unique.
  5. Answer the requested cost: 4x+5y=4×36+5×22=144+110=254. The cost is HK$254, option C; the whole-dollar data need no rounding.
Do it on the calculator

Example 2

In the Cartesian plane, line L₁ has equation 2x−y=−8 and line L₂ has equation 4x−2y=−22. Find the number of intersection points and justify your answer using the equations.

  1. A.0
  2. B.1
  3. C.2
  4. D.∞
Answer
A 0 intersection points; no solution.
Standard solution (without a calculator)
  1. Match the left sides: twice the first equation is 4x−2y=−16, with the same left side as the second equation.
  2. Compare constants: the second equation requires 4x−2y=−22, but −16≠−22, so both requirements cannot hold.
  3. Confirm by elimination: subtract twice the first equation from the second to obtain 0=−22−(−16)=−6, a contradiction. There is no solution.
  4. Interpret geometrically: the equations are y=2x+8 and y=2x+11. Their slopes are both 2, but their different intercepts make them distinct parallel lines.
  5. Conclude: there are 0 intersection points, option A. The program returns status 0 for no solution.
Do it on the calculator

Example 3

Real numbers x and y satisfy 3x−6y=9 and x−2y=3. Classify the solution set of this system and express all solutions using a real parameter.

  1. A.∅
  2. B.{(3,0)}
  3. C.|solutions|=2
  4. D.|solutions|=∞
Answer
D Infinitely many solutions: (x,y)=(3+2t,t), for any real t.
Standard solution (without a calculator)
  1. Identify a repeated equation: three times the second equation is exactly 3x−6y=9, including the constant term.
  2. Keep the single constraint: both equations impose only x−2y=3. Elimination gives 0=0 and adds no further restriction.
  3. Introduce a parameter: let y=t for any real t. Then x=3+2t, so all solutions are (x,y)=(3+2t,t).
  4. Verify both equations: 3(3+2t)−6t=9 and (3+2t)−2t=3 hold for every real t.
  5. Conclude: there are infinitely many solutions, option D. The pair (3,0) is only the t=0 example; program status 2 does not mean two solutions.
Do it on the calculator
02

When to use it

Write the equations as ax+by=c and dx+ey=f. The program tests the determinant and consistency of the constants, and outputs x and y only for a numerically stable unique solution.

Enter both equations in order

  • At the first A?, B?, C?, enter a, b, c; at the repeated prompts enter d, e, f. Enter 0 for a missing x or y term, and normally re-enter all six numbers.
  • Rewrite Ax+By+C=0 as Ax+By=−C, or y=mx+k as −mx+y=k. Build equations first for applications such as ticket prices, using a consistent unit for each equation.

Read the status and solution

  • Status 1: press EXE to read X=x and then Y=y. Status 0: no solution. Status 2: infinitely many solutions. Status −1: near-singular numerical case; no x or y is given, so check by exact written elimination.
  • Only status 1 leaves a solution in X and Y. After reading y, press AC and evaluate expressions such as 4X+5Y for the requested combination.

Question types

  • Original HKDSE Mathematics Compulsory Part practice: application equations, the number of intersections of two lines, and distinguishing inconsistent from repeated equations.

Before you start

  • Use COMP; angle units do not affect the result, and the screens use Deg/P1. The program needs 198 bytes; P1–P4 share 680 bytes. Each run uses ClrMemory to clear A, B, C, D, X, Y, M and Ans, then sets Norm 1.
  • Choose an empty slot and save any old program before entry. MODE 6, 3, 1 deletes the old P1 program, unlike the run-time ClrMemory that clears numerical memory.
  • The classification guarantee covers exact terminating decimals with at most six significant digits, each nonzero magnitude from 10⁻²⁰ to 10²⁰, or 0. The program does not validate this range; results outside it are not guaranteed.
  • Fractions such as 1/2 and 3/8 have terminating decimals and may use the fraction key. Recurring fractions such as 1/3, π, radicals and measured approximations are outside that guarantee. Clear exact denominators first; do not round 1/3 and then decide parallelism or coincidence.
  • The second A?, B?, C? retain the matching first-equation values. A blank EXE reuses that value; enter 0 explicitly to replace it with zero. A blank does not mark an unknown.
  • −1 does not mean no solution: it protects against a small nonzero determinant and can occur even with a true unique solution. Only status 1 makes X and Y solution values; statuses 0 and 2 do not supply a particular solution or a free parameter.
  • For geometric lines, each equation needs at least one nonzero x or y coefficient; an all-zero coefficient row is treated as an ordinary equation for consistency. The final screen may show Lbl 9 above its value. Read results in order and press AC to leave; EXE restarts.

Sign in to unlock the full programme

Checking access…

The programme code and appendix unlock together.

Checking access…

Sign in to unlock the full programme

Checking access…

The programme code and appendix unlock together.