Learn

Learning preferences

Make learning more comfortable. Changes apply immediately.

Enlarges page content, including diagrams and their labels. You can also use your browser’s zoom.

Choose the colours that are easiest for you to distinguish. Applies to lesson diagrams and lab plots. Labels, shapes, hatching and line patterns also distinguish meanings. Source photographs and raw image brightness stay unchanged; mask-only views are available for image overlays.

ExampleComparisonSample link

Saved in this browser on this device. Preferences are separate from progress backups.

Lesson 4 of 30

Find every integer solution, not just one

Use gcd divisibility to solve linear integer equations and parameterize all solutions.

Loading your saved responses…

Try the optional starting-point checks and targeted refreshers. You can continue directly into this lesson.

Try

A purchase total of 31 can be made from items priced 5 and 8 using 5x+8y=31. One solution is x=3, y=2. But an integer equation asks first about all integer solutions, not only physically meaningful nonnegative purchases. Adding eight to x and subtracting five from y leaves the total unchanged. This gives a direction along the solution line that stays on the integer lattice.

Predict

Predict why 6x+10y=7 is impossible. Every left-hand value is even, so it cannot equal seven. The gcd captures this obstruction in general. Conversely, divisibility by the gcd is enough for an integer solution, though it does not guarantee nonnegative variables. For example, a small positive total may require a negative coefficient in the Bézout construction.

Experiment

Generate the family for the purchase example.

Integer tx=3+8ty=2−5tTotal
−1−5731
03231
111−331

Only the middle row is nonnegative. Solve the two inequalities on t to prove this, rather than assuming the displayed rows exhaust the infinite family.

Understand

Let d=gcd(a, b)>0 for integers a, b not both zero. If ax+by=c, then d|c. If d|c, Bézout gives ua+vb=d, and multiplying by c/d produces a solution. With a, b nonzero and one solution (x₀, y₀), subtract another solution to obtain (a/d)(x−x₀)=−(b/d)(y−y₀). The reduced coefficients are coprime, so b/d divides x−x₀. Write that difference as (b/d)t and substitute to get y−y₀=−(a/d)t. Every integer t then gives a solution, proving both construction and completeness. Zero coefficients can be handled directly rather than divided by.

Apply

When a, b>0 and variables must be nonnegative, substitute the parameterization into x≥0 and y≥0. These inequalities give a finite interval of allowed integer t values; ceilings and floors determine the endpoints. This method avoids searching an unbounded grid. It also exposes units and feasibility in an application: integer counts, capacities and upper limits are extra constraints, not automatic consequences of the original equation. If c changes, the gcd criterion immediately identifies which totals are impossible, but feasible nonnegative totals may require further reasoning.

A nonnegative constraint changes the problem after the integer family is found. For x=x0+(b/g)t and y=y0−(a/g)t with positive a, b, impose x≥0 and y≥0 to obtain a lower and upper bound on the integer parameter t. The ceiling of the lower bound and floor of the upper bound determine the count; an inverted interval means no nonnegative solutions. This is different from failure of the gcd condition, which rules out all integer solutions before inequalities are considered. Always state whether the requested domain is integers, nonnegative integers or positive integers.

Continue

The same equation can be viewed as a congruence ax≡c modulo b, followed by recovery of y. The next lessons develop that viewpoint and explain exactly when cancellation or inversion is allowed. A complete solution should provide the solvability test, one witness, the full parameter family and any imposed bounds. A single numerical pair proves existence but never by itself proves that all possibilities have been found.

Return to the number theory unit to choose a targeted retry. Continue with calculate with classes while respecting cancellation.

Apply · explain · revise

Practice and reasoning

Drafts save locally as you type. Reveal worked solutions when useful; the site remembers that exposure. Automatic matches check the requested answer, while written arguments require review against the rubric.

Does 18x+30y=7 have integer solutions? Enter 1 for yes and 0 for no.

Integers, fractions and finite decimals are accepted. Expressions such as sqrt(2) are not parsed by this checker.

How many nonnegative integer solutions satisfy 3x+5y=15?

Integers, fractions and finite decimals are accepted. Expressions such as sqrt(2) are not parsed by this checker.

Prove ax+by=c is solvable exactly when gcd(a, b)|c, assuming a, b not both zero.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Given one solution (x₀, y₀), derive all solutions when a, b are nonzero and d=gcd(a, b).

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Find all integer solutions to 7x+11y=1.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Find all nonnegative solutions to 4x+7y=40.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Reflect and continue

Before marking this lesson complete, explain one key idea without the worked solution and identify a condition that matters. Marking complete records participation, not independent mastery.