HadamardMatrix
returns an n×n Hadamard matrix.
Details and Options
- Each entry Hrs of the Hadamard matrix is by default defined as , where , is the bit in the binary representation of the integer , and .
- must be a power of two.
- Rows or columns of the HadamardMatrix are basis sequences of the DiscreteHadamardTransform.
- The Hadamard matrix is symmetric and orthogonal and is thus its own inverse. »
- The following options are supported:
-
Method Automatic specify the sequency ordering method WorkingPrecision ∞ precision at which to create entries - The setting of the Method option specifies the sequency ordering (number of zero crossings in the Hadamard basis sequences). Possible settings include:
-
"BitComplement" "GrayCode" Gray code reordering of "BitComplement" "Sequency" sequency increases with row and column index (default) - The bit complement ordering is also known as the Sylvester ordering.
- The sequency ordering is also known as the Walsh ordering.
- The Gray code ordering is also known as the dyadic ordering or Paley ordering.
- HadamardMatrix[…,TargetStructure…] specifies the structure of the returned matrix. Possible settings for TargetStructure include:
-
Automatic automatically choose the representation returned "Dense" represent the matrix as a dense matrix "Hermitian" represent the matrix as a Hermitian matrix "Orthogonal" represent the matrix as an orthogonal matrix "Symmetric" represent the matrix as a symmetric matrix "Unitary" represent the matrix as a unitary matrix - HadamardMatrix[…,TargetStructureAutomatic] is equivalent to HadamardMatrix[…,TargetStructure"Dense"].
Examples
open allclose allOptions (3)
TargetStructure (1)
Properties & Relations (4)
The discrete Hadamard transform of a vector is equivalent to multiplying the vector by the Hadamard matrix:
Sylvester's construction of a Hadamard matrix of order 4:
This corresponds to the bit complement sequency ordering:
The Hadamard matrix is symmetric and orthogonal:
Because of these properties, the Hadamard matrix is its own inverse:
Define the n×n "bit reversal" permutation matrix for n a power of 2:
Define the n×n Gray code permutation matrix for n a power of 2:
Generate Hadamard matrices with different sequency orderings:
The Hadamard matrix with Gray code ordering is equivalent to applying the Gray code permutation to the Hadamard matrix with bit-complement sequency ordering:
The Hadamard matrix with sequency ordering is equivalent to applying the bit-reversal permutation to the Hadamard matrix with Gray code ordering:
The Hadamard matrix with sequency ordering is equivalent to successively applying the bit-reversal permutation and Gray code permutation to the Hadamard matrix with bit-complement sequency ordering:
Text
Wolfram Research (2012), HadamardMatrix, Wolfram Language function, https://reference.wolfram.com/language/ref/HadamardMatrix.html (updated 2024).
CMS
Wolfram Language. 2012. "HadamardMatrix." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/HadamardMatrix.html.
APA
Wolfram Language. (2012). HadamardMatrix. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/HadamardMatrix.html