CT–INTEGRATED MATHEMATICS

Can You Fix the Broken Line Tool?

A geometry program draws a line through two selected points using the slope formula. It works for some point pairs but fails for others. Can you identify what the rule is missing?

ByLinwei YuThe University of Hong Kong

THE GEOMETRY CHALLENGE

One rule. Two different results.

A student-built line tool uses the slope formula. Compare what happens when the tool receives these two pairs of points.

m = (y₂ − y₁) / (x₂ − x₁)
✓   WORKSA (1, 2) · B (3, 6)
xy A (1, 2)B (3, 6)

The program draws the line.   y = 2x

!   ERRORA (1, 2) · B (1, 6)
xy A (1, 2)B (1, 6)Division by zero(6 − 2) / (1 − 1)

The program cannot calculate the slope.   No line is drawn.

?
THE CHALLENGE

Find out why the program fails. Develop a rule that can draw the correct line through any two distinct points and recognize when the two selected points coincide.

From the problem to a computational solution

CT–STEM pedagogical framework applied to a mathematics task

01 · ENGAGE→02 · EXPLORE↔03 · EXPLAIN→04 · ELABORATE↕05 · EVALUATE THROUGHOUT
01

Frame the problem

Engage

Identify what the tool needs

The tool receives the coordinates of two points. Clarify the required inputs and outputs, and identify the mathematical cases that the solution must address.

DESIGN TASK

How can a program draw the line through two selected points without failing on special cases?
A (1, 2)B (3, 6)
InputsTwo coordinate pairs, A(x₁, y₁) and B(x₂, y₂)
Required outputA line equation for distinct points; a message for coincident points
Mathematical knowledgeSlope and equations of straight lines
Special casesVertical lines and coincident points
m = (y₂ − y₁) / (x₂ − x₁)
CT practicesAbstractionDecomposition
02

Investigate the cases

Explore

Collect and examine observations

Keep A(1, 2) fixed. Move B to investigate how changes in its coordinates affect the slope and the line determined by the two points.

MATHEMATICAL REFERENCE
3
6
The two points have different x-coordinates; the slope is defined.
CT practicesData Collection & AnalysisData Representation
03

Represent the findings

Explain

Clarify the mathematical conditions

Organize the observations into three cases. Explain when the slope formula is valid and when the two points determine a unique line.

CASE A
x₁ ≠ x₂
Nonvertical line · Slope defined
CASE B
x₁ = x₂, y₁ ≠ y₂
Vertical line · Slope undefined
CASE C
x₁ = x₂, y₁ = y₂
Coincident points · No unique line
Slope defined
m = (6 − 2) / (3 − 1) = 2

The unique line is y = 2x.

CT practiceData Representation
04

Develop and improve a solution

Elaborate

Construct, test, debug, and revise

Compare the slope-only rule with a rule that checks the input conditions. Use the point pairs in Explore to test what each rule returns, then explain the necessary changes.

Select a line-drawing rule

✓
Program result

Test a nonvertical line, a vertical line, and coincident points. Which input reveals the problem with the slope-only rule?

CT practicesAlgorithmic ThinkingAutomationModelingTestingDebuggingIterationGeneralization
05

Evidence-based evaluation across all phases

Evaluate

Evidence, feedback, and further learning

Use evidence from each phase to examine students’ mathematical understanding, CT practices, and the quality of their developing solution. Evaluation informs feedback and may lead to further exploration, explanation, or revision.

01 · MATHEMATICAL UNDERSTANDING
Explanation of mathematical conditions

Distinguish nonvertical, vertical, and coincident cases, and explain when the slope formula is defined.

02 · CT PRACTICES
Use of computational reasoning

Identify relevant information, represent cases, develop conditional rules, and test and debug solutions.

03 · SOLUTION QUALITY
Correctness and scope of the rule

Check that the rule handles all three cases and explain why the conditions cover every pair of input points.

Evidence: Students’ observations, explanations, proposed rules, test cases, and revisions.
Feedback: Return to Explore, Explain, or Elaborate when further inquiry or refinement is needed.