- Since 0 + 0 = 0 we have (0 + 0).
*a*= 0.*a*and so by the Distributive law we get 0.*a*+ 0.*a*= 0.*a*and adding the additive inverse of 0.*a*to each side we get 0.*a*= 0.

Then 0 = (-1).0 = (-1).(1 + (-1)) = -1 + (-1)^{2}and adding 1 to both sides gives 1 = (-1)^{2}.

- The ring axioms for
*T*follow from those for**R**.

The multiplicative identity of*T*is the function*s*↦ 1 for all*s*∈*S*.

Invertible functions are those for which*f*(*s*) ≠ 0 for any*s*∈*S*.

Defining a function*f*from*S*= {*a*,*b*} to**R**means giving a pair of real numbers for*x*=*f*(*a*) and*y*=*f*(*b*) and so the set*T*can be regarded as the Cartesian product**R**×**R**.

Then the addition and multiplication on**R**×**R**become:

(*x*_{1},*y*_{1}) + (*x*_{2},*y*_{2}) = (*x*_{1}+*x*_{2},*y*_{1}+*y*_{2}) and (*x*_{1},*y*_{1}) . (*x*_{2},*y*_{2}) = (*x*_{1}.*x*_{2},*y*_{1}.*y*_{2}) - The ring axioms follow because sums, differences and products of numbers of this form also have this form. The other ring axioms then follow from those in
**R**.

(√2 + 1)(√2 - 1) = 2 - 1 = 1 and so (√2 + 1)^{-1}= √2 - 1. Similarly (2√2 + 3)^{-1}= 2√2 - 3.

An element*a*+*b*√2 has a multiplicative inverse if and only if*a*^{2}- 2*b*^{2}= ±1 - As in the last question sums, differences and products of numbers of this form also have this form and the other axioms follow from those in
**C**.

The elements of*R*form an "equiangular lattice" as shown.

Following the hint, the only invertible elements are those for which |*z*| = 1 since there are no non-zero elements inside the unit circle. Thus the invertible elements are the six ones indicated.

- The multiplicative identity is the "identity function":
*x*↦*x*. It is a standard result in set theory that the invertible functions are those which are one-one and onto (bijections).

If*x*∈**R**then (*f*+*g*)*h*(*x*) = (*f*+*g*)(*h*(*x*)) =*f*(*h*(*x*)) +*g*(*h*(*x*)) =*f**h*(*x*) +*g**h*(*x*) = (*f**h*+*g**h*)(*x*).

If (say)*h*(*x*) =*x*^{2}then it is easy to verify that for most functions*f*,*g*the other distributive law fails.

Something like this is called a*Near-ring*. - a)
*a*^{2}+*b*^{2}= (*p*^{2}-*q*^{2})^{2}+ (2*pq*)^{2}= (*p*^{4}- 2*p*^{2}*q*^{2}+*q*^{4)}+ 4*p*^{2}*q*^{2}=*p*^{4}+ 2*p*^{2}*q*^{2}+*q*^{4}= (*p*^{2}+*q*^{2})^{2}=*c*^{2}.

b) Any square modulo 4 is either 0 or 1. Since*a*and*b*are coprime they are not both even and since*a*^{2}+*b*^{2}is a square this must be 1 mod 4. Hence*a*and*b*cannot both be odd.

c) We have both*a*and*c*odd and so*a*±*b*are both even and we may take (*c*+*a*)/2 =*P*and (*c*-*a*)/2 =*Q*. We need to show that*P*and*Q*are exact squares.

Then 4*PQ*= (*c*+*a*)(*c*-*a*) =*c*^{2}-*a*^{2}=*b*^{2}. Since*a*,*b*are coprime, so are*a*,*b*and*c*and hence*c*+*a*and*c*-*a*have no common factors. So*P*and*Q*are coprime and since the product 4*PQ*is a square, both*P*and*Q*are squares. So take*p*= √*P*and*q*= √*Q*and we have*b*= 2*pq*as required.

Taking small coprime values for*p*,*q*with*p*,*q*not both odd gives the eight primitive Pythagorean triples:

(3, 4, 5), (15, 8, 17), (35, 12, 37), (5, 12, 13), (21, 20, 29), (45, 28, 53), (7, 24, 25), (9, 40, 41).

d) The above pair (*a*,*b*) = (21, 20) is pretty good. The next good ones are (119, 120), (697, 696), (4059, 4060), (23661, 23660), (137903, 137904), ... corresponding to*p*= 5, 12, 29, 70, 169, 408, ... and*q*= 2, 5, 12, 29, 70, 169, ... which you can find using Maple. Can you see how these sequences of*p*'s and*q*'s continue?

e) This suggests looking for*a*-*b*= ±1 or equivalently (*p*^{2}-*q*^{2}) - 2*pq*= ±1. We can write this as (*p*-*q*)^{2}- 2*q*^{2}= ±1 or, putting*p*-*q*=*r*as*r*^{2}- 2*q*^{2}= ±1. This is a famous equation called*Pell's equation*and can be solved (with infinitely many solutions) by continued fractions methods.

For example, take*r*= 577 and*q*= 408 giving*p*= 985 and (*a*,*b*) = (803761, 803760).

You can find out more about this at:

http://www-history.mcs.st-and.ac.uk/HistTopics/Pell.html