Compare Absolute Values
Loading the math board and drawing, please wait…
In collections
Gegenzahl und Betrag einer rationalen Zahl
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
Point(Line[PStart, xAxis]) → PEndDistance(PStart, PEnd) → linelengthSequence(PStart + (m * (linelength / linedivision, 0)), m, -1, 41) → listLinePointsKeepIf(x(PStart) ≤ x(P) ≤ x(PEnd), P, listLinePoints) → listPointsPoint(listPoints) → PLenaPoint(listPoints) → PJanisRandomElement(possibleValuesJanis) → randomNumJanisSelectedIndex(DropDown4) → input4SelectedIndex(DropDown7) → input7SelectedIndex(DropDown3) → input3SelectedIndex(DropDown8) → input8SelectedIndex(DropDown9) → input9SelectedIndex(DropDown10) → input10SelectedIndex(DropDown11) → input11Element({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) → PLenaFixElement({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) → PJanisFixIf(moveableJanis, PLena, PLenaFix) → PLenaPosIf(moveableJanis, PJanis, PJanisFix) → PJanisPosIf(abs(numLena) < abs(numJanis), 3, If[abs(numLena) > abs(numJanis), 2, 1]) → compareElement({0, 0, 0, 0, 0, 1, 2, 3, 0}, step) → exnumTextfield(input1) → Eingabefeld1Textfield(input2) → Eingabefeld2Segment(listLinePoints(1), Element[Last[listLinePoints], 1]) → lineSequence(PStart + ((lineabslong * m) * (linelength / linedivision, 0)), m, 0, linedivision / lineabslong) → listLinePointsLongKeepIf(x(PStart) < x(P) < x(PEnd) ∧ (¬(P ∈ listLinePointsLong)), P, listLinePoints) → listLinePointsShortZip(Segment[P + (0, (-lineheightlong)), P + (0, lineheightlong)], P, listLinePointsLong) → listLinesLongZip(Segment[P + (0, (-lineheightshort)), P + (0, lineheightshort)], P, listLinePointsShort) → listLinesShortZip(Text[(("\textsf\small\bold{" * n) * "}"), m + (0, -1), true, true, -0, 1], n, {0}, m, {listPoints(linedivision / 2 + 1)}) → listLineText0Translate(listPoints, ((-0.5 * sizejanisx), 0)) → listLinePointsGirlsSegment(PJanisH, PHaus2) → janis2Segment(PLenaH, PHaus1) → lena1Segment(PHaus2, PMitte) → linehausPoint(Line[Birne1, xAxis]) → Birne2Zip(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) → listLineTextText("\textsf\small{Janis}", PJanisPos + (0, heightlena + 0.95) + (0, -1), true, true, -0, 1) → textJanisPoint(Line[AP1a, xAxis]) → AP2aCircleArc(Midpoint[AP1a, AP1b] + (arrowdepth, 0), AP1a, AP1b) → arrow1CircleArc(Midpoint[AP2a, AP2b] - (arrowdepth, 0), AP2b, AP2a) → arrow2PointIn(Circle[Pos3, 10]) → Pos4Textfield(input5) → Eingabefeld5Textfield(input6) → Eingabefeld6Point(Line[Birne3, xAxis]) → Birne4LaTeX(step, true, true) → TextStepZip(Text[(((("\textsf\footnotesize\bold{" * If[n < 0, "--", If[n > 0, "+", ""]]) * "}{") * abs(n)) * "}"), PJanisPos + (0, -1), true, true, -0, 1], n, {numJanis}) → listTextNumJanisText("\textsf\small{Lena}", PLenaPos + (0, heightlena + 0.95) + (0, -1), true, true, -0, 1) → textLenaZip(Text[(((("\textsf\footnotesize\bold{" * If[n < 0, "--", If[n > 0, "+", ""]]) * "}{") * abs(n)) * "}"), PLenaPos + (0, -1), true, true, -0, 1], n, {numLena}) → listTextNumLenaIf(step < 6, Pos3, Pos3 + (-0.5, -1.2)) → Pos3aIf(step < 6, Pos3 + (2.42, 0), Pos3a + (3.4, 0)) → Pos3bZip(Text[(("\textsf\small{" * m) * " }"), P + (0.05, 0), true, true, 0], m, {abs(numLena), abs(numJanis)}, P, listPMitte) → listTextNumMitte