Finding Function Equation from Two Points

Finding Function Equation from Two Points
Loading the math board and drawing, please wait…
2025-12-17 22:05
In collections Lineare Funktionen
This example demonstrates how to determine the equation of a linear function given two points. Key mathematical concepts include slope calculation, y-intercept determination, and function graph construction. The construction involves GeoGebra commands such as Sequence, Point, Segment, and Intersect to create points, draw lines, and find intersections. Suitable for middle school mathematics educati

GeoGebra Commands & Parameters

  1. Sequence(Random[1, 10], i, 1, 10) → randomNumbers, {10, 2, 9, 6, 5, 3, 4, 5, 9, 2}
  2. Element(randomNumbers, Mod[questionCount, Length[randomNumbers]] + 1) → randomNumber
  3. Textfield(input) → inputBox
  4. Join({Sequence[Segment[Corner[4] + (RasterPixMat * ((k * RasterStepXY), 0)), Corner[4] + (RasterPixMat * ((k * RasterStepXY), RasterMaxY))], k, 0, RasterMaxX / RasterStepXY], Sequence[Segment[Corner[4] + (RasterPixMat * (0, (k * RasterStepXY))), Corner[4] + (RasterPixMat * (RasterMaxX, (k * RasterStepXY)))], k, 0, RasterMaxY / RasterStepXY]}) → RasterStrecken
  5. Join({Sequence[Text[UnicodeToLetter[65 + k], Midpoint[Corner[4] + (RasterPixMat * ((k * RasterStepXY), RasterMaxY)), Corner[4] + (RasterPixMat * (((k + 1) * RasterStepXY), RasterMaxY))], false, true, 0, -1], k, 0, RasterMaxX / RasterStepXY - 1], Sequence[Text[("" * k), Midpoint[Corner[4] + (RasterPixMat * (RasterMaxX, ((k - 1) * RasterStepXY))), Corner[4] + (RasterPixMat * (RasterMaxX, (k * RasterStepXY)))], false, true, 1, 0], k, 1, RasterMaxY / RasterStepXY]}) → RasterBeschriftung
  6. Sequence(Sequence[Corner[4] + (RasterPixMat * ((k * RasterStepXY), (m * RasterStepXY))), k, 0, RasterMaxX / RasterStepXY], m, 0, RasterMaxY / RasterStepXY) → RasterPunkte
  7. PolyLine(PosSB, Corner[txt031, 1] + (0.25, -0.1), Corner[txt031, 2] + (0.1, -0.1), Corner[txt031, 3] + (0.1, 0.1), Corner[txt031, 4] + (-0.1, 0.1), Corner[txt031, 1] + (-0.1, 0.25), PosSB) → sb03
  8. PolyLine(PosSB, Corner[txt041, 1] + (0.25, -0.1), Corner[txt041, 2] + (0.1, -0.1), Corner[txt041, 3] + (0.1, 0.1), Corner[txt041, 4] + (-0.1, 0.1), Corner[txt041, 1] + (-0.1, 0.25), PosSB) → sb04
  9. PolyLine(PosSB, Corner[txt051, 1] + (0.25, -0.1), Corner[txt051, 2] + (0.1, -0.1), Corner[txt051, 3] + (0.1, 0.1), Corner[txt051, 4] + (-0.1, 0.1), Corner[txt051, 1] + (-0.1, 0.25), PosSB) → sb05
  10. PolyLine(PosSB, Corner[txt061, 1] + (0.25, -0.1), Corner[txt061, 2] + (0.1, -0.1), Corner[txt061, 3] + (0.1, 0.1), Corner[txt061, 4] + (-0.1, 0.1), Corner[txt061, 1] + (-0.1, 0.25), PosSB) → sb06
  11. Segment(Origin + ((minX / stepX * disX) - edgeAxisX, 0), Origin + ((maxX / stepX * disX) + edgeAxisX, 0)) → segAxisX
  12. Segment(Origin + (0, (minY / stepY * disY) - edgeAxisY), Origin + (0, (maxY / stepY * disY) + edgeAxisY)) → segAxisY
  13. Sequence(Origin + ((minX / stepX * disX), 0) + (k * (disX, 0)), k, 0, maxX / stepX - minX / stepX) → PointsXAxis
  14. Sequence(Origin + (0, (minY / stepY * disY)) + (k * (0, disY)), k, 0, maxY / stepY - minY / stepY) → PointsYAxis
  15. Sequence(Segment[PointsXAxis(k) + (0, (-disSeg)), PointsXAxis(k) + (0, disSeg)], k, 1, Length[PointsXAxis]) → segXAxis
  16. Sequence(Segment[PointsYAxis(k) + ((-disSeg), 0), PointsYAxis(k) + (disSeg, 0)], k, 1, Length[PointsYAxis]) → segYAxis
  17. Sequence(m, m, minX, maxX, stepX) → numbersXAxis
  18. Sequence(Text[((("\textsf{\footnotesize{\(" * If[numbersXAxis(k) ≥ 0, "\phantom{\(-\)}", ""]) * If[Element[numbersXAxis, k] ≟ 0, "", ("" * Element[numbersXAxis, k])]) * "\)}}"), PointsXAxis(k) + (-0.12, (-disSeg)), false, true, 0, -1], k, 1, (maxX - minX) / stepX + 1) → CapX
  19. Sequence(m, m, minY, maxY, stepY) → numbersYAxis
  20. Sequence(Text[((("\textsf{\footnotesize{\(" * If[numbersYAxis(k) ≥ 0, "\phantom{\(-\)}", ""]) * If[Element[numbersYAxis, k] ≟ 0, "", ("" * Element[numbersYAxis, k])]) * "\)}}"), PointsYAxis(k) + ((-disSeg) + 0.05, 0), false, true, -1, 0], k, 1, (maxY - minY) / stepY + 1) → CapY
  21. Element({Polygon[(x(PointsXAxis(1)), y(PointsYAxis(1))) + ((-edgeAxisX) - 0.05, (-edgeAxisY) - 0.05), (x(PointsXAxis(Length[PointsXAxis])), y(PointsYAxis(1))) + (edgeAxisX + 0.05, (-edgeAxisY) - 0.05), (x(PointsXAxis(Length[PointsXAxis])), y(PointsYAxis(Length[PointsYAxis]))) + (edgeAxisX + 0.05, edgeAxisY + 0.05), (x(PointsXAxis(1)), y(PointsYAxis(Length[PointsYAxis]))) + ((-edgeAxisX) - 0.05, edgeAxisY + 0.05)]}, 1) → polyAxis
  22. Sequence(Sequence[(x(PointsXAxis(k)), y(PointsYAxis(m))), k, 1, Length[PointsXAxis]], m, 1, Length[PointsYAxis]) → AllPointsOnGrid
  23. PolyLine(PosSB, Corner[txt011, 1] + (-0.1, 0.25), Corner[txt011, 1] + (-0.1, 0), Corner[txt011, 2] + (0.1, 0), Corner[txt011, 3] + (0.1, 0.1), Corner[txt011, 4] + (-0.1, 0.1), Corner[txt011, 1] + (-0.1, 0.75), PosSB) → sb01
  24. Point(Join[{{ParkPoints02(1)}, AllPointsOnGrid}]) → Point022
  25. Point(Join[{{ParkPoints02(2)}, AllPointsOnGrid}]) → Point021
  26. Text("\textsf{\bold{\textcolor{#50c1ce}{Zieh mich!}}}", Midpoint[ParkPoints02(1), ParkPoints02(2)] + (0, 0.25), false, true, 0, 1) → CapZiehMich02
  27. Circle(Point021, radFB02) → circleFB021
  28. Circle(Point022, radFB02) → circleFB022
  29. Segment(Point031, Point031 + (Min[anim04, 1] * ((2 * disX), 0))) → segSD041
  30. Segment(Point031 + ((2 * disX), 0), Point031 + ((2 * disX), 0) + (Min[anim04 - 1, 1] * (0, (-4 * disY)))) → segSD042
  31. Segment(Point032, Point032 + ((anim04 - 2) * (Point031 - Point032))) → segFunc
  32. Text("\textsf{\bold{f}}", AllPointsOnGrid(10, 2), false, true, -1, 0) → CapF
  33. Textfield(input031) → InputBox031
  34. Textfield(input032) → InputBox032
  35. Textfield(input051) → InputBox051
  36. Textfield(input061) → InputBox061
  37. If(step ≟ 2, correct02 ∧ anim02 ≥ 1, true, step ≟ 3, correct031 ∧ correct032 ∧ correct033, step ≟ 4, anim04 ≟ 2, step ≟ 5, correct051 ∧ correct061, step ≟ 6, true) → clickableBtnNext
  38. Element({Polygon[(x(PointsXAxis(1)), y(PointsYAxis(1))) + ((-edgeAxisX) - 0.2, (-edgeAxisY) - 0.2), (x(PointsXAxis(Length[PointsXAxis])), y(PointsYAxis(1))) + (edgeAxisX + 0.2, (-edgeAxisY) - 0.2), (x(PointsXAxis(Length[PointsXAxis])), y(PointsYAxis(Length[PointsYAxis]))) + (edgeAxisX + 0.2, edgeAxisY + 0.2), (x(PointsXAxis(1)), y(PointsYAxis(Length[PointsYAxis]))) + ((-edgeAxisX) - 0.2, edgeAxisY + 0.2)]}, 1) → polyAxisStart
  39. PolyLine(PosSB, Corner[txt021, 1] + (0.25, -0.1), Corner[txt021, 2] + (0.1, -0.1), Corner[txt021, 3] + (0.1, 0.1), Corner[txt021, 4] + (-0.1, 0.1), Corner[txt021, 1] + (-0.1, 0.25), PosSB) → sb02
  40. Segment(Origin, Point031) → segd
  41. Text("\textsf{\textcolor{#1565c0}{\bold{d}}}", Midpoint[Origin, Point031] + ((-disX), 0), false, true, 0, 0) → Capd
  42. Intersect(FuncTransform, polyAxis) → PointFuncTransform02, PointFuncTransform01
  43. Segment(PointFuncTransform01, PointFuncTransform01 + (anim02 * (PointFuncTransform02 - PointFuncTransform01))) → segFunkDraw
  44. If(step ≟ 2, anim02 ≟ 0 ∨ anim02 ≟ 1, If[step ≟ 4, anim04 ≟ 0 ∨ anim04 ≟ 2, true]) → clickableBtnBack
  45. Text("\textsf{\bold{\footnotesize{\textcolor{#9c4381}{2}}}}", Midpoint[segSD041], false, true, 0, 1) → CapSD041
  46. Text("\textsf{\bold{\footnotesize{\textcolor{#db6114}{\(-\)4}}}}", Midpoint[segSD042] - (0, 0.2), false, true, 1, 0) → CapSD042