Compare Absolute Values

Compare Absolute Values
Loading the math board and drawing, please wait…
2025-03-26 20:42
This example helps students understand the concept of absolute value and its meaning on the number line by comparing the absolute values of two negative numbers. It uses GeoGebra commands such as Point, Distance, Sequence, KeepIf, RandomElement, etc. Suitable for 7-8th grade students.

GeoGebra Commands & Parameters

  1. Point(Line[PStart, xAxis]) → PEnd
  2. Distance(PStart, PEnd) → linelength
  3. Sequence(PStart + (m * (linelength / linedivision, 0)), m, -1, 41) → listLinePoints
  4. KeepIf(x(PStart) ≤ x(P) ≤ x(PEnd), P, listLinePoints) → listPoints
  5. Point(listPoints) → PLena
  6. Point(listPoints) → PJanis
  7. RandomElement(possibleValuesJanis) → randomNumJanis
  8. SelectedIndex(DropDown4) → input4
  9. SelectedIndex(DropDown7) → input7
  10. SelectedIndex(DropDown3) → input3
  11. SelectedIndex(DropDown8) → input8
  12. SelectedIndex(DropDown9) → input9
  13. SelectedIndex(DropDown10) → input10
  14. SelectedIndex(DropDown11) → input11
  15. Element({listPoints(21 - 13), listPoints(21 - 13), listPoints(21 - 13), listPoints(21 - 13), listPoints(21 - 13), listPoints(21 + numsLenaJanis(1, 1)), listPoints(21 + numsLenaJanis(2, 1)), listPoints(21 + numsLenaJanis(3, 1))}, step) → PLenaFix
  16. Element({listPoints(-21 + 13), listPoints(-21 + 13), listPoints(-21 + 13), listPoints(21 + randomNumJanis), listPoints(21 + randomNumJanis), listPoints(21 + numsLenaJanis(1, 2)), listPoints(21 + numsLenaJanis(2, 2)), listPoints(21 + numsLenaJanis(3, 2))}, step) → PJanisFix
  17. If(moveableJanis, PLena, PLenaFix) → PLenaPos
  18. If(moveableJanis, PJanis, PJanisFix) → PJanisPos
  19. If(abs(numLena) < abs(numJanis), 3, If[abs(numLena) > abs(numJanis), 2, 1]) → compare
  20. Element({0, 0, 0, 0, 0, 1, 2, 3, 0}, step) → exnum
  21. Textfield(input1) → Eingabefeld1
  22. Textfield(input2) → Eingabefeld2
  23. Segment(listLinePoints(1), Element[Last[listLinePoints], 1]) → line
  24. Sequence(PStart + ((lineabslong * m) * (linelength / linedivision, 0)), m, 0, linedivision / lineabslong) → listLinePointsLong
  25. KeepIf(x(PStart) < x(P) < x(PEnd) ∧ (¬(P ∈ listLinePointsLong)), P, listLinePoints) → listLinePointsShort
  26. Zip(Segment[P + (0, (-lineheightlong)), P + (0, lineheightlong)], P, listLinePointsLong) → listLinesLong
  27. Zip(Segment[P + (0, (-lineheightshort)), P + (0, lineheightshort)], P, listLinePointsShort) → listLinesShort
  28. Zip(Text[(("\textsf\small\bold{" * n) * "}"), m + (0, -1), true, true, -0, 1], n, {0}, m, {listPoints(linedivision / 2 + 1)}) → listLineText0
  29. Translate(listPoints, ((-0.5 * sizejanisx), 0)) → listLinePointsGirls
  30. Segment(PJanisH, PHaus2) → janis2
  31. Segment(PLenaH, PHaus1) → lena1
  32. Segment(PHaus2, PMitte) → linehaus
  33. Point(Line[Birne1, xAxis]) → Birne2
  34. Zip(Text[(((("\textsf\footnotesize{" * If[x(m) < x(PMitte), "--", "+"]) * "}\textsf{") * n) * "}"), m + (0, -1), true, true, -0, 1], n, {((linedivision * 0.5) * faktor), ((linedivision * 0.25) * faktor), ((linedivision * 0.25) * faktor), ((linedivision * 0.5) * faktor)}, m, listLinePointsText) → listLineText
  35. Text("\textsf\small{Janis}", PJanisPos + (0, heightlena + 0.95) + (0, -1), true, true, -0, 1) → textJanis
  36. Point(Line[AP1a, xAxis]) → AP2a
  37. CircleArc(Midpoint[AP1a, AP1b] + (arrowdepth, 0), AP1a, AP1b) → arrow1
  38. CircleArc(Midpoint[AP2a, AP2b] - (arrowdepth, 0), AP2b, AP2a) → arrow2
  39. PointIn(Circle[Pos3, 10]) → Pos4
  40. Textfield(input5) → Eingabefeld5
  41. Textfield(input6) → Eingabefeld6
  42. Point(Line[Birne3, xAxis]) → Birne4
  43. LaTeX(step, true, true) → TextStep
  44. Zip(Text[(((("\textsf\footnotesize\bold{" * If[n < 0, "--", If[n > 0, "+", ""]]) * "}{") * abs(n)) * "}"), PJanisPos + (0, -1), true, true, -0, 1], n, {numJanis}) → listTextNumJanis
  45. Text("\textsf\small{Lena}", PLenaPos + (0, heightlena + 0.95) + (0, -1), true, true, -0, 1) → textLena
  46. Zip(Text[(((("\textsf\footnotesize\bold{" * If[n < 0, "--", If[n > 0, "+", ""]]) * "}{") * abs(n)) * "}"), PLenaPos + (0, -1), true, true, -0, 1], n, {numLena}) → listTextNumLena
  47. If(step < 6, Pos3, Pos3 + (-0.5, -1.2)) → Pos3a
  48. If(step < 6, Pos3 + (2.42, 0), Pos3a + (3.4, 0)) → Pos3b
  49. Zip(Text[(("\textsf\small{" * m) * " }"), P + (0.05, 0), true, true, 0], m, {abs(numLena), abs(numJanis)}, P, listPMitte) → listTextNumMitte