We recall Kronecker's identity and review how limiting cases give the representations of a number as

a sum of four squares and the representations of a number as a sum of two squares. The two formulas

imply respectively Lagrange's theorem that every number can be written as a sum of four squares and

Fermat's theorem that an odd prime can be written as the sum of two squares if and only if it is congruent

to 1 modulo 4. By considering a limiting case of a higher-dimensional Kronecker-type identity, we obtain

an identity found by both Andrews and Crandall. We then use the Andrews-Crandall identity to give a

new proof of a formula of Gauss for the representations of a number as a sum of three squares. From

the Kronecker-type identity, we also deduce Gauss's theorem that every positive integer is representable

as a sum of three triangular numbers.