The Walsh matrices are a special case of Hadamard matrices where the rows are rearranged so that the number of sign changes in a row is in increasing order.
are given by the recursive formula (the lowest order of Hadamard matrix is 2): and in general for 2 ≤ k ∈ N, where ⊗ denotes the Kronecker product.
Finally, we re-order the rows of the matrix according to the number of sign changes in ascending order.
where the successive rows have 0, 3, 1, and 2 sign changes (we count the number of times we switch from a positive 1 to a negative 1, and vice versa).
The sequency ordering of the rows of the Walsh matrix can be derived from the ordering of the Hadamard matrix by first applying the bit-reversal permutation and then the Gray-code permutation:[2] where the successive rows have 0, 1, 2, 3, 4, 5, 6, and 7 sign changes.