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. Here are the first few examples:
                              K                      (            0            )                          =                              [                                                            1                                                      ]                                            K                      (            1            )                          =                  [                                                                      1                                                  1                                                                              1                                                  −                  1                                                              ]                                  K                      (            2            )                          =                  [                                                                      1                                                  1                                                  1                                                                              2                                                  0                                                  −                  2                                                                              1                                                  −                  1                                                  1                                                              ]                                  K                      (            3            )                          =                  [                                                                      1                                                  1                                                  1                                                  1                                                                              3                                                  1                                                  −                  1                                                  −                  3                                                                              3                                                  −                  1                                                  −                  1                                                  3                                                                              1                                                  −                  1                                                  1                                                  −                  1                                                              ]                        
                              K                      (            4            )                          =                  [                                                                      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                                                              ]                                  K                      (            5            )                          =                  [                                                                      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                                                              ]                .                
                              K                      (            0            )                          =                              [                                                            1                                                      ]                                            K                      (            1            )                          =                  [                                                                      1                                                  1                                                                              1                                                  −                  1                                                              ]                                  K                      (            2            )                          =                  [                                                                      1                                                  1                                                  1                                                                              2                                                  0                                                  −                  2                                                                              1                                                  −                  1                                                  1                                                              ]                                  K                      (            3            )                          =                  [                                                                      1                                                  1                                                  1                                                  1                                                                              3                                                  1                                                  −                  1                                                  −                  3                                                                              3                                                  −                  1                                                  −                  1                                                  3                                                                              1                                                  −                  1                                                  1                                                  −                  1                                                              ]                        
                              K                      (            4            )                          =                  [                                                                      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                                                              ]                                  K                      (            5            )                          =                  [                                                                      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                                                              ]                .                
In general, for positive integer                     N                , the entries                               K                      i            j                                (            N            )                                   are given via the generating function
                    (        1        +        v                  )                      N            −            j                                  (        1        −        v                  )                      j                          =                  ∑                      i                                    v                      i                                    K                      i            j                                (            N            )                                  where the row and column indices                     i                 and                     j                 run from                     0                 to                     N                .
These Krawtchouk polynomials are orthogonal with respect to symmetric binomial distributions,                     p        =        1                  /                2                .