I'm trying to solve the following diophantine equation:

$\displaystyle 45a -32b +21c -12d +5e -0f + X = 480$

(That's a coefficient of zero for the variable f and 1 for the variable X.)

Specifically, I'm trying to solve for X, in the case when the solution is 480.

In this thread, user ILikeSerena provides some helpful discussion using matrices to find solutions.

In my example, we know $\displaystyle gcd(45,-32,21,-12,5,0,1)=1$. 1 divides 480, so as I understand it, we know that the equation has solutions and there is a solution for 1.

$\displaystyle 45a' -32b' +21c' -12d' +5e' -0f' + X' = 1$

So, referring to ILikeSerena's earlier posts, I create a matrix as follows:

$\displaystyle \begin{bmatrix} a &b &c &d &e &f &X \end{bmatrix}$

$\displaystyle \begin{bmatrix}1 &0 &0 &0 &0 &0 &0\\0 &1 &0 &0 &0 &0 &0\\0 &0 &1 &0 &0 &0 &0\\0 &0 &0 &1 &0 &0 &0\\0 &0 &0 &0 &1 &0 &0\\0 &0 &0 &0 &0 &1 &0\\0 &0 &0 &0 &0 &0 &1 \end{bmatrix}\begin{bmatrix}45 \\-32 \\21 \\-12 \\5 \\0 \\1 \end{bmatrix}$

I'm just not sure what I should be aiming to do next. I already have one row with a remainder of only 1, but I can't see how that helps. Should I be manipulating the matrix so that it is one of the other variables that has a remainder of 1?

Grateful for any hints/pointers.

CL