Write the Equation of a Line

Write the Equation of a Line
Loading the math board and drawing, please wait…
2019-08-23 05:59
This example demonstrates how to write the equation of a line based on given conditions. Key mathematical concepts include linear equations, slope, and y-intercept. Using GeoGebra commands such as FromBase, Random, and RandomElement, dynamic generation of different conditions for the line equation is achieved. Suitable for students in middle school and above to learn about linear equations.

GeoGebra Commands & Parameters

  1. FromBase(d_1, 10) → d_2
  2. FromBase(n_1, 10) → n_2
  3. Random(-6, 6) → b
  4. RandomElement({1 / 2, 2 / 3, 3 / 4, 3 / 5, -1 / 2, -2 / 3, -3 / 4, -3 / 5}) → a
  5. If(b > -1, "x +", "x -") → If(a > -1, "+", "-")
  6. Textfield(n_1) → InputBox1
  7. FromBase(b_1, 10) → b_2
  8. Textfield(d_1) → InputBox2
  9. If(a ≥ 0, "y = ", "y = -") → t_1
  10. Textfield(b_1) → InputBox3
  11. If(a ≥ 0 ∧ n_2 / d_2 ≠ a, "Check your slope", "") → Sol_1
  12. If(b ≥ 0 ∧ b_2 ≠ b, "Check your y-intercept", "") → Sol_3
  13. If(b ≥ 0, (((-n_2)) / d_2 * x) + b_2, (((-n_2)) / d_2 * x) - b_2) → g_1
  14. If(b ≥ 0, (a_2 * x) + b_2, (a_2 * x) - b_2) → g
  15. If(b < 0 ∧ b_2 ≠ abs(b), "Check your y-intercept", "") → Sol_4
  16. If(a ≥ 0 ∧ g ≟ f, "Good Job!", "") → text1
  17. If(a < 0 ∧ g_1 ≟ f, "Good Job!", "") → text3
  18. If(a < 0 ∧ n_2 / d_2 ≠ abs(a), "Check your slope", "") → Sol_2