Show that no non-zero integers $a, b, x, y$ satisfy: \begin{cases} ax-by=16. \\ ay+bx=1. \end{cases}

From Baltic-Way 2021.

\begin{align} &(a+bi)(x+yi)=(ax-by)+i(ay+bx)=16+i. \\ &|(a+bi)(x+yi)|=|16+i|. \\ &\sqrt{a^2+b^2}\sqrt{x^2+y^2}=\sqrt{257}. \\ &(a^2+b^2)(x^2+y^2)=257. \\ &\therefore a^2+b^2=257, x^2+y^2=1 \text{ or } a^2+b^2=1, x^2+y^2=257.(\because 257: \text{ prime.)} \\ \Rightarrow & \text{No solution.} \end{align}

Is my solution right?

  • 3
    $\begingroup$ Your solution is correct, and very elegant too +1 $\endgroup$
    – FShrike
    Jun 27 at 16:18
  • 1
    $\begingroup$ Very nice solution. I can't say I would've immediately thought to apply complex numbers here. $\endgroup$
    – Deepak
    Jun 27 at 16:49
  • 1
    $\begingroup$ I edited your title to be clearer and more specific. $\endgroup$
    – Deepak
    Jun 27 at 16:53
  • 2
    $\begingroup$ From comments on your previous post: arithmetic of quadratic rings, usual items $x + y \sqrt d$ or $x + y \omega$ where $\omega = \frac{1 + \sqrt d}{2},$ is the first generalization of Gauss composition; the explicit formula is Dirichlet's method. You might enjoy a book on binary quadratic forms; my favorite is Buell. There is plenty in Dickson's Intro (1929) and other book that willbe fairly easy to find. $\endgroup$
    – Will Jagy
    Jun 27 at 17:49
  • 2
    $\begingroup$ Not as elegant, but you could also square the two equalities, then add them up: $$\require{cancel} a^2x^2 + b^2y^2 - \cancel{2abxy} + a^2y^2+b^2x^2 + \cancel{2abxy} = 257 \;\;\iff\;\; (a^2+b^2)(x^2+y^2)=257 $$ $\endgroup$
    – dxiv
    Jun 28 at 1:01

1 Answer 1


Your solution is indeed valid, and as FShrike writes in the comments, quite elegant. I'm putting this confirmation in a community wiki answer to mark this question as answered. (I think this is how that works!)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.