# All the solutions of linear Diophantine equation [closed]

Given the linear Diophantine equation:

$a_1 x_1 + a_2 x_2 + ... + a_n x_n = b$

and its particular solution $(x_1^*, x_2^*, ..., x_n^*)$.

How to write down all the solutions of this equation?

## closed as off-topic by Emil Jeřábek, RP_, Franz Lemmermeyer, Chris Godsil, Sebastian GoetteMar 17 '17 at 22:46

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "MathOverflow is for mathematicians to ask each other questions about their research. See Math.StackExchange to ask general questions in mathematics." – Emil Jeřábek, RP_, Franz Lemmermeyer, Chris Godsil, Sebastian Goette
If this question can be reworded to fit the rules in the help center, please edit the question.

First, complete the vector $(a_1, \dotsc, a_n)$ to a matrix $A$ with determinant $1.$ Then the solutions (of the homogeneous system) are all integer linear combinations of the second through $n$ columns of $A^{-1}.$ That you can complete the vector with gcd 1 to a unimodular matrix is basic to geometry of numbers, and can be proved fairly easily by induction (or see Morris Newman's book on "Integral Matrices", Thm II.1).