# Two meanings of QR code

“QR code” can mean a couple different things.

There is a connection between these two, though that’s not at all obvious.

What almost everyone thinks of as a QR code is a quick response code, a grid of black and white squares that encode some data.

For example, the QR code below contains my contact info.

There’s also something in algebraic coding theory called a QR code, a quadratic residue code.

These are error-correcting codes that are related to whether numbers are squares or not modulo a prime.

The connection between quick response codes and quadratic residue codes is that both involve error-correcting codes.

However, quick response codes use Reed-Solomon codes for error correction, not quadratic residue codes.

Reed-Solomon codes are robust to long sequences of error, which is important for quick response codes since, for example, a row of the image might be cut off.

It would be cute if QR (quick response) codes used QR (quadratic residue) codes, but alas they don’t.

More on quadratic residues Solving quadratic congruences Graphs and square roots modulo a prime Distribution of quadratic residues More on quick response codes QR codes and percolation More on quadratic residue codes Golay codes.