Adding and Subtracting Mixed Numbers Using Visual Models
Loading the math board and drawing, please wait…
This interactive GeoGebra activity demonstrates the process of adding and subtracting mixed numbers using visual fraction bar models. It covers core concepts such as combining whole numbers and fractions, finding common denominators, and simplifying results. The construction uses commands like RandomUniform, Take, Element, If, Remove, Min, Max, Sequence, Polygon, Flatten, Vector, Zip, Join, Numerator, Denominator, Mod, Corner, PointToPixels, and Translate to generate random problems, build visual fraction blocks, and check answers. Suitable for grades 4-5, it helps students understand fraction operations through concrete pictorial representations and supports classroom instruction or independent practice.
GeoGebra Commands & Parameters
RandomUniform(0, 0.99, 200) → allRandomSeeds, {0.8852668807984533, 0.4896175041875582, 0.9004505281500474, 0.8138983790191049, 0.8743290129216643, 0.280047258804096, 0.688947078158236, 0.7314437083587516, 0.33015050254879785, 0.4374839454951024, 0.7865017680308626, 0.948456827350805, 0.9523338719634472, 0.8879031638956442, 0.326564356269377, 0.20191105737721926, 0.544155404387917, 0.37035095429884735, 0.9295919961041543, 0.26126065668314585, 0.2928170492551908, 0.43398286051044127, 0.1632876973859459, 0.6597332013015768, 0.5644923376034315, 0.28100317256816376, 0.7459109743954649, 0.4325136115536207, 0.645241401653553, 0.4807366049418677, 0.31820311969620046, 0.1336686650495682, 0.8055400541858188, 0.725407542104399, 0.7753592964670433, 0.946971717715064, 0.41877564181187255, 0.156980252385173, 0.8573045987205175, 0.5375352873303335, 0.55260672870276, 0.25663145516769814, 0.023295934101422333, 0.2813445819629811, 0.016566821355951007, 0.5440797083462516, 0.06557215775415652, 0.318408332547996, 0.4797115666653138, 0.04308882092974475, 0.8564136883888528, 0.16230382463626608, 0.068466770780014, 0.36199114272649835, 0.5535490430463219, 0.8043905977128843, 0.3571291887091137, 0.7940439125663369, 0.7903596154505329, 0.5549036764889184, 0.671704770058851, 0.8718357932151388, 0.6797846206030655, 0.1755094225087554, 0.18193857223359952, 0.1328024651837247, 0.2542175744783526, 0.01871812622383158, 0.09649849162578111, 0.5391898995578216, 0.4980109628830728, 0.708795307822319, 0.3423191176942597, 0.7855200147859026, 0.22447035925505318, 0.4764994512322494, 0.5710955856014176, 0.8397687354782861, 0.20541959262415144, 0.7460965714385699, 0.6338357465841632, 0.6010568230835057, 0.4985579781256158, 0.8376629087619224, 0.298237912042506, 0.2866849331463792, 0.005905990641803135, 0.5006850191229956, 0.1734552663763915, 0.014809326718981294, 0.715650185302284, 0.7964019406127016, 0.602540738463283, 0.5359604726533497, 0.6496489913083535, 0.5762071851874363, 0.5045364921735608, 0.44694766961485544, 0.5397494965506686, 0.7317390742667167, 0.9257789737833055, 0.16447225847292204, 0.19789211934840947, 0.0390357445808529, 0.573535762873985, 0.04298920538724174, 0.6177426667460697, 0.7143167039021513, 0.17457280858672006, 0.4720106774973076, 0.6292941465566924, 0.14257605628588838, 0.22667054075468812, 0.34213718185589415, 0.23251719427082926, 0.8822328235566445, 0.40246475171009877, 0.3866312155242223, 0.531716194988782, 0.24958212289126844, 0.41228303469988586, 0.08631500354211522, 0.6887605420749305, 0.7457261392997986, 0.14588029289839263, 0.36997847515154614, 0.8608121267773605, 0.46603714002709196, 0.4021460565302815, 0.15032504077535255, 0.9465588985332778, 0.17801544827895094, 0.6209646019823888, 0.8167624137930775, 0.5042900560736514, 0.007652824644084788, 0.5124533235765624, 0.26106222640222193, 0.9754129097592554, 0.14709782213881253, 0.7157870148723641, 0.49006659471257613, 0.21821159787337185, 0.36754255567844835, 0.24273646858496856, 0.10121177014645842, 0.8287873909098654, 0.5008103720380103, 0.5199059749839374, 0.7816678641054383, 0.0891962687906296, 0.8211230250325355, 0.8084507709442981, 0.8103609144423143, 0.5168123375009249, 0.28496022865210713, 0.7107862467754863, 0.05404750528781396, 0.6738984585312358, 0.7817987169337312, 0.5004720399719412, 0.17395421668747843, 0.06225229590014529, 0.3818274332493135, 0.2140607970983637, 0.18827321663783553, 0.3946236126410121, 0.00848434879018251, 0.2622464650942895, 0.7780222596098103, 0.3623614213926476, 0.5838454691174382, 0.742129478210496, 0.18943179469904872, 0.8274513181953294, 0.7835197169990287, 0.4928361218217288, 0.16511325256573864, 0.7767414083800084, 0.2947641368043649, 0.33308663523983156, 0.45879228952697887, 0.08673229443312182, 0.587031660389509, 0.031601837712440725, 0.5843574180885444, 0.4988191711668289, 0.4180993032965854, 0.8294699711022389, 0.009378842466115936, 0.29732635303525745, 0.6712978724235205, 0.6077660113362489, 0.9360936928890489, 0.12606204260583, 0.2801744277520937, 0.033822636762754515, 0.8291337774304036, 0.9434487799910692, 0.7461672527077756}Take(allRandomSeeds, randIndex, randIndex + numRandoms - 1) → currentRandomSeedsElement(denBOps, denIndex) → denBElement(denAOps, denIndex) → denAIf(denA ≟ 4, Element[{1, 3}, 1 + floor((currentRandomSeeds(2) * 2))], 1 + floor((currentRandomSeeds(2) * (denA - 1)))) → numerARemove(Element[{{}, {1}, {1, 2}, {1, 3}, {1, 2, 3, 4}, {}, {1, 2, 3, 4, 5, 6}}, denB], If[sameDen, {numerA}, {}]) → possibleNumerBElement(possibleNumerB, 1 + floor((currentRandomSeeds(3) * Length[possibleNumerB]))) → numerBMin(numberA, numberB) → numberRightMax(numberA, numberB) → numberLeftElement({3, 3, 2.6, 2.2}, totalBlocks - 2) → unitSizeIf(numberA > numberB, 1, 2) → indexLeftElement({numUnitsA, numUnitsB}, indexLeft) → numUnitsLeftIf(indexLeft ≟ 1, 2, 1) → indexRightElement({numUnitsA, If[testSum ≥ 5 ∧ (¬isSubtract), numUnitsB - 1, numUnitsB]}, indexRight) → numUnitsRightElement({denA, denB}, indexRight) → denRightSequence(AnchorRight + ((K * spacing), 0), K, 0, 2) → anchorsRightElement({numerA, numerB}, indexLeft) → numPartsLeftElement({numerA, numerB}, indexRight) → numPartsRightElement({numerA, numerB}, indexRight) → numerRightElement({numerB, numerA}, indexRight) → numerLeftElement({denA, denB}, indexLeft) → denLeftIf(sameDen, denLeft, (denLeft * denRight)) → denCommonIf(isSubtract, numberLeft - numberRight, numberLeft + numberRight) → answerValPolygon({(0, 0), (0, unitSize), (unitSize, unitSize), (unitSize, 0)}) → templateUnitBoxSequence(AnchorLeft + ((K * spacing), 0), K, 0, 2) → anchorsLeftIf(animateControl ≟ animateCount, 1, animateControl - floor(animateControl)) → animateCurrentFlatten(Sequence[Sequence[AnchorSolnParts + ((i * unitSize / denLeft), (j * unitSize / If[sameDen, 1, denRight])), i, 0, denLeft - 1], j, 0, (2 * denRight)]) → anchorSolnPartsAllIf(sameDen, numerRight, (numerRight * denLeft)) → numCommonRightVector(anchorSolnPartsAll(1), anchorSolnUnits(numUnitsSoln)) → vCarryIf(isBorrow, numUnitsLeft - 1, numUnitsLeft) → numUnitsLeft2If(animateCount < fade2Index + 1, 0, If[animateCount ≟ fade2Index + 1, animateCurrent, 1]) → animateCarryIf(sameDen, 0, If[animateCount ≤ 3, 0, If[animateCount < 5, animateCurrent, 1]]) → animateStage1bIf(sameDen, Polygon[{(0, 0), (unitSize / denRight, 0), (unitSize / denRight, unitSize), (0, unitSize)}], Polygon[{(0, 0), (unitSize, 0), (unitSize, unitSize / denRight), (0, unitSize / denRight)}]) → templatePartRightSequence(AnchorPartsRight + If[sameDen, ((A * unitSize / denRight), 0), (0, (A * unitSize / denRight))], A, 0, denRight - 1) → anchorRightPartsZip(Translate[templatePartRight, A], A, anchorRightParts) → outlinePartsRightFlatten(Sequence[Sequence[AnchorPartsRight + ((i * unitSize / denLeft), (j * unitSize / denRight)), i, 0, If[sameDen, numerRight - 1, denLeft - 1]], j, 0, If[sameDen, 0, numerRight - 1]]) → anchorRightPartsCDFlatten(Sequence[Sequence[anchorsLeft(2) + ((i * unitSize / denLeft), (j * unitSize / denRight)), i, 0, denLeft - 1], j, 0, If[sameDen, 0, denRight - 1]]) → anchorLeftPartsBorrowJoin({Flatten[Sequence[Sequence[anchorsLeft(3) + ((i * unitSize / denLeft), (j * unitSize / denRight)), i, 0, numerLeft - 1], j, 0, If[sameDen, 0, denRight - 1]]], If[isBorrow, anchorLeftPartsBorrow, {}]}) → anchorLeftPartsCDTake(anchorSolnPartsAll, 1, Length[anchorLeftPartsCD] + If[caseNum ≟ caseSUBTRACT, 0, Length[anchorRightPartsCD]]) → anchorSolnPartsCurrentIf(animateCount < fade1Index + numUnitsRight, 0, If[animateCount ≥ fade1Index + numUnitsRight + numCommonRight, numCommonRight + If[animateCount ≥ fade2Index, 1, 0], animateCount - fade1Index - numUnitsRight]) → moveRightPartPolygon({(0, 0), (unitSize / denLeft, 0), (unitSize / denLeft, unitSize / If[sameDen, 1, denRight]), (0, unitSize / If[sameDen, 1, denRight])}) → templateCommonVector(anchorSolnPartsCurrent(If[isSubtract, numCommonLeft - moveRightPart + 1, numCommonLeft + moveRightPart]) - anchorRightPartsCD(moveRightPart)) → vMovePartRightIf(animateCount - sizeStageA ≤ 0, 0, If[animateCount - sizeStageA ≤ numUnitsLeft2, animateCount - sizeStageA, numUnitsLeft2 + 1]) → moveLeftUnitIf(animateCount - sizeStageA ≤ moveLeftUnit, 0, If[moveLeftUnit < animateCount - sizeStageA ≤ moveLeftUnit + numCommonLeft, animateCount - sizeStageA - moveLeftUnit, numCommonLeft]) → moveLeftPartElement({{}, {anchorsRight(1)}, {anchorsRight(2), anchorsRight(1)}}, numUnitsRight + 1) → anchorUnitsRightIf(animateCount ≤ fade1Index, 0, If[fade1Index < animateCount ≤ fade1Index + numUnitsRight, animateCount - fade1Index, numUnitsRight]) → moveRightUnitSequence(anchorsLeft(2 - A), A, 0, numUnitsLeft - 1) → anchorUnitsLeftIf(isBorrow, Element[{{}, {anchorUnitsLeft(2)}}, numUnitsLeft], anchorUnitsLeft) → anchorUnitsLeft2If(isSubtract, "\minus", "\plus") → caseOperatorNumerator(answerVal) → answerNumerDenominator(answerVal) → answerDenIf(sameDen, "", (((((((((("\text{ \dfrac{" * fracLeftnumer) * "}{") * answerDen) * "} ") * caseOperator) * " \dfrac{") * fracRightNumer) * "}{") * answerDen) * "} = }")) → commonDenTextMod(answerNumer, answerDen) → answerRemainderIf(answerNumer < answerDen, "", (((("\text{ \dfrac{" * answerNumer) * "}{") * answerDen) * "} = }")) → improperTextVector(anchorSolnUnits(moveLeftUnit) - anchorUnitsLeft2(moveLeftUnit)) → vMoveLeftUnitIf(sameDen, 0, 2) → lengthMoveBarsIf(sameDen, 0, 1) → denCaseCorner(5) → layoutAppSizePointToPixels(Corner[onboardingDisplayText, 2], Corner[1], Corner[3], Corner[5]) → layoutOnboardingIf(sameDen, "") → makeCommonDenSequence(anchorsLeft(3) + (A, 0), A, 0, unitSize - unitSize / denLeft, unitSize / denLeft) → anchorLeftPartsIf(animateControl < 4, 0, animateControl - floor(animateControl)) → animateUnitBoxVector(anchorSolnUnits(If[isSubtract, numUnitsLeft2 - moveRightUnit + 1, numUnitsLeft2 + moveRightUnit]) - anchorUnitsRight(moveRightUnit)) → vMoveRightUnitTranslate(templateUnitBox, anchorUnitsRight(moveRightUnit) + (animateCurrent * vMoveRightUnit)) → moveUnitRightTranslate(templateUnitBox, anchorUnitsLeft2(moveLeftUnit) + (animateCurrent * vMoveLeftUnit)) → moveUnitLeftElement({If[sameDen, answerNumer, 2 + answerNumer] + 1, lengthMoveBars + 2 + numUnitsA + numUnitsB}, caseNum) → lengthSliderPolygon({(0, 0), (unitSize / denLeft, 0), (unitSize / denLeft, unitSize), (0, unitSize)}) → templatePartLeftZip(Translate[templatePartLeft, A], A, Take[anchorLeftParts, 1, denLeft]) → outlinePartsLeftZip(Translate[templatePartLeft, A], A, Take[anchorLeftParts, 1, numPartsLeft]) → fracPartsLeftZip(Translate[templateUnitBox, A], A, anchorUnitsLeft) → unitBoxesLeftZip(Translate[templateUnitBox, A], A, anchorUnitsRight) → unitBoxesRightIf(animateCount < fade1Index ∨ (¬isSubtract), 0, If[animateCount > fade1Index, 1, animateCurrent]) → animateFade1If(animateCount < fade2Index, 0, If[animateCount > fade2Index, 1, animateCurrent]) → animateFade2Zip(Translate[templateUnitBox, A], A, Take[anchorSolnUnits, 1, numUnitsSoln]) → solnUnitBoxesFinalIf(sameDen, 0, If[animateCount ≤ 1, 0, If[animateCount < 3, animateCurrent, 1]]) → animateStage1aZip(Translate[A, (animateStage1b * (anchorsLeft(3) - AnchorPartsRight))], A, outlinePartsRight) → barsRightZip(Translate[templatePartRight, A], A, Take[anchorRightParts, 1, numerRight]) → fracPartsRightTranslate(templateCommon, anchorRightPartsCD(moveRightPart) + (animateCurrent * vMovePartRight)) → movePartRightTranslate(templateCommon, anchorLeftPartsCD(moveLeftPart) + (animateCurrent * vMoveLeftPart)) → movePartLeftIf(isSubtract, numCommonLeft, numCommonLeft + 1) → indexStage3BIf(moveRightUnit > 1 ∨ animateCount > numUnitsRight + fade1Index, Sequence[Translate[templateUnitBox, Vector[anchorSolnUnits(numUnitsLeft2 - A + 1)]], A, 1, If[animateCount > fade1Index + numUnitsRight, numUnitsRight, moveRightUnit - 1]], {}) → solnUnitBoxesRightSubtractIf(moveRightUnit > 1 ∨ animateCount > numUnitsRight + fade1Index, Sequence[Translate[templateUnitBox, Vector[anchorSolnUnits(numUnitsLeft2 + A)]], A, 1, If[animateCount > fade1Index + numUnitsRight, numUnitsRight, moveRightUnit - 1]], {}) → solnUnitBoxesRightZip(Translate[templateCommon, A], A, Reverse[Take[anchorSolnPartsCurrent, numCommonLeft + 2 - moveRightPart]]) → solnPartBoxesRightSubtractZip(Translate[templateCommon, A], A, Take[anchorLeftPartsCD, moveLeftPart + 1]) → remainingLeftPartsZip(Translate[templateUnitBox, A], A, Take[anchorUnitsLeft2, moveLeftUnit + 1]) → remainingLeftUnitsZip(Translate[templateUnitBox, A], A, Take[anchorUnitsRight, moveRightUnit + 1]) → remainingRightUnitsTranslate(templateUnitBox, anchorSolnPartsAll(1) + (If[IsInteger[answerVal] ∧ answerVal ≠ 4, 0, animateCarry] * vCarry)) → unitCarryIf(sameDen, 0, 5) → startStage1cIf(¬isBorrow, 0, If[animateCount < startStage1c, 0, If[animateCount ≤ startStage1c, animateCurrent, 1]]) → animateStage1cZip(Translate[templateUnitBox, A], A, Take[anchorSolnUnits, 1, moveLeftUnit - 1]) → solnUnitsLeftZip(Translate[templateCommon, A], A, Take[anchorSolnPartsCurrent, 1, Min[numCommonLeft, animateCount - sizeStageA - numUnitsLeft2 - 2]]) → solnPartBoxesLeftZip(Translate[templateCommon, A], A, Take[anchorSolnPartsCurrent, numCommonLeft + 1, numCommonLeft + moveRightPart - 1]) → solnPartBoxesRightAddZip(Translate[templateCommon, A], A, Take[anchorRightPartsCD, moveRightPart + 1]) → remainingRightPartsZip(Translate[templateUnitBox, A], A, Take[anchorSolnUnits, 1, numUnitsSoln - If[isCarry, 1, 0]]) → solnUnitsFinalZip(Translate[templateCommon, A - If[isCarry, (0, (-unitSize) + (animateCarry * unitSize)), (0, 0)]], A, Take[anchorSolnPartsAll, 1, numPartsSoln]) → solnPartsFinalPointToPixels(AnchorLineA, Corner[1], Corner[3], Corner[5]) → LineStartPXZip(Translate[templateUnitBox, A], A, Join[{anchorUnitsLeft, anchorUnitsRight, {anchorsLeft(3), AnchorPartsRight}}]) → outlineUnitsZip(Translate[A, (animateStage1a * (AnchorPartsRight - anchorsLeft(3)))], A, outlinePartsLeft) → barsLeft
AI Drawing Prompt Reference
Describe a graphic using fraction bar models to demonstrate adding and subtracting mixed numbers. The graphic includes a unit bar and multiple fraction bars representing the integer and fractional parts of mixed numbers. It features an addition example showing how to combine two mixed numbers by aligning fractional parts and adding them, while adding the integer parts. It also includes a subtraction example demonstrating subtraction from a larger mixed number, possibly involving borrowing. The fraction bars are distinguished by color or position to indicate integer and fractional parts. The construction order: first draw the unit bar, then create fraction bars based on randomly generated mixed numbers, separating integer and fractional parts, and finally combining the fraction bars into mixed number graphics, with steps labeled.
The prompt above was compiled from the original drawing commands and is for reference only.