Krawtchouk matrices

In mathematics, Krawtchouk matrices are matrices whose entries are values of Krawtchouk polynomials at nonnegative integer points. The Krawtchouk matrix K(N) is an (N + 1) × (N + 1) matrix. The first few Krawtchouk matrices are:



K^{(0)} = \begin{bmatrix} 1 \end{bmatrix}, \qquad K^{(1)} = \left[ \begin{array}{rr} 1 & 1 \\ 1 & -1 \end{array} \right], \qquad K^{(2)} = \left[ \begin{array}{rrr} 1 & 1 &  1 \\ 2 &  0 & -2 \\ 1 & -1 &  1 \end{array} \right], \qquad K^{(3)} = \left[ \begin{array}{rrrr} 1 & 1 &  1 &  1 \\ 3 &  1 & -1 & -3 \\ 3 & -1 & -1 &  3 \\ 1 & -1 &  1 & -1 \end{array} \right], $$

K^{(4)} = \left[ \begin{array}{rrrrr} 1 & 1 &  1 &  1 &  1 \\ 4 &  2 &  0 & -2 & -4 \\ 6 &  0 & -2 &  0 &  6 \\ 4 & -2 &  0 &  2 & -4 \\ 1 & -1 &  1 & -1 &  1 \end{array} \right], \qquad K^{(5)} = \left[ \begin{array}{rrrrrr} 1 & 1 &  1 &  1 &  1 &   1 \\  5 &  3 &  1 & -1 & -3 &  -5 \\ 10 &  2 & -2 & -2 &  2 &  10 \\ 10 & -2 & -2 &  2 &  2 & -10 \\  5 & -3 &  1 &  1 & -3 &   5 \\  1 & -1 &  1 & -1 &  1 &  -1 \end{array} \right]. $$

Definition
In general, for positive integer $$N$$, the entries $$K^{(N)}_{ij}$$ are given by the generating function:
 * $$(1 + v)^{N-j}\,(1 - v)^j = \sum_i v^i K^{(N)}_{ij},$$

where the row and column indices $$i$$ and $$j$$ run from $$0$$ to $$N$$. Explicitly:
 * $$K^{(N)}_{ij} = \sum_k (-1)^k \binom{j}{k} \binom{N - j}{i - k},$$

or in terms of the Krawtchouk polynomials:
 * $$K^{(N)}_{ij} = \kappa_i(j, N).$$

The values of a Krawchouk matrix can also be calculated using a recurrence relation. Filling the top row with ones and the rightmost column with alternating binomial coefficients, the other entries are each given by the sum of the neighbouring entries to the top, topright and right.

Properties
The Krawtchouk polynomials are orthogonal with respect to symmetric binomial distributions, $$p = 1/2$$.

As a transformation, a Krawtchouk matrix is an involution up to scaling:
 * $$(K^{(N)}_{ij})^2 = 2^N I.$$

Krawchouk matrices have an LDU decomposition involving triangular Pascal matrices and a diagonal matrix of the powers of 2.

The eigenvalues are $$\pm \sqrt{2^n}$$, and the determinant is $$(-2)^{n(n+1)/2}$$.