Linear Diophantine Equation/Examples/2x + 3y = 4
Jump to navigation
Jump to search
Example of Linear Diophantine Equation
The linear diophantine equation:
- $2 x + 3 y = 4$
has the general solution:
- $x = -4 + 3 t, y = 4 - 2 t$
Graphical Presentation
Proof
We have that:
- $\gcd \set {2, 3} = 1$
which is (trivially) a divisor of $4$.
So, from Solution of Linear Diophantine Equation, a solution exists.
First we find a single solution to $2 x + 3 y = 4$:
\(\ds 1\) | \(=\) | \(\ds 1 \times 3 - 1 \times 2\) | ||||||||||||
\(\ds \leadsto \ \ \) | \(\ds 4\) | \(=\) | \(\ds 4 \times 3 - 4 \times 2\) |
and so:
\(\ds x_0\) | \(=\) | \(\ds -4\) | ||||||||||||
\(\ds y_0\) | \(=\) | \(\ds 4\) |
is a solution.
From Solution of Linear Diophantine Equation, the general solution is:
- $\forall t \in \Z: x = x_0 + \dfrac b d t, y = y_0 - \dfrac a d t$
where $d = \gcd \set {a, b}$.
In this case:
\(\ds x_0\) | \(=\) | \(\ds -4\) | ||||||||||||
\(\ds y_0\) | \(=\) | \(\ds 4\) | ||||||||||||
\(\ds a\) | \(=\) | \(\ds 2\) | ||||||||||||
\(\ds b\) | \(=\) | \(\ds 3\) | ||||||||||||
\(\ds d\) | \(=\) | \(\ds 1\) |
giving:
\(\ds x\) | \(=\) | \(\ds -4 + 3 t\) | ||||||||||||
\(\ds y\) | \(=\) | \(\ds 4 - 2 t\) |
$\blacksquare$
Sources
- 1971: George E. Andrews: Number Theory ... (previous) ... (next): $\text {2-3}$ The Linear Diophantine Equation: Exercise $1 \ \text {(a)}$