Let p be an odd prime and gcd(a,p)=1. Establish that the quadratic congruence ax^2+bx+c = 0(modp) is solvable if and only if b^2-4ac is either zero or a quadratic residue of p.
if and only if (multiple by 4a): -the 'if and only if' is true since (4a, p)=1 - or equivalently: that is (1)
From here it is obvious that implies either or
Conversely if either or we can see that our congruence is solvable as follows:
1. If our congruence ( remember (1) ) holds if now is solvable since (2a, p)=1. Thus our congruence is solvable.
2. If we have for some and it is enough to take: which is solvable since (2a, p)=1