A partity check can be represented as a form of matrix multiplication.

Imagine we have an input bit stream, *a*, of length *k*:

Then a matrix of the form below will perform an even parity check if *k *is odd (or an odd parity check if *k* is even):

Here’s a very simple worked example:

Let a = 10110

Parity check matrix =

Output = 101101 (modulo 2 arithmetic is used to compute each ‘column’ in the output)

Of course parity checks are a crude form of 1 bit error detection and do not allow for error correction.

## 2 responses to “Parity checks as matrix multiplication”

[…] Parity checks as matrix multiplication […]

[…] Comments More on parity matri… on Parity checks as matrix m…More on error correc… on The difference between Hamming…The difference betwe… […]