# Number theory: simple gcd question

## Homework Statement

If ax+by=1, then (a,b)=1.

## The Attempt at a Solution

I am just wondering if this is true. Because I know it is not true if ax+by=c, then (a,b)=c.

Here is a proof I came up with:

Suppose (a,b)=c, c>1.Then c|a and c|b, but then from our assumption, this implies that c|1, a contradiction.

I'm new to writing proofs so I just want to make sure I am on the right track. Thanks.