HadamardMatrix

HadamardMatrix[n]

returns an n×n Hadamard matrix.

Details and Options

  • Each entry Hrs of the Hadamard matrix is by default defined as , where , is the ^(th) 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 Automaticspecify the sequency ordering method
    WorkingPrecision precision at which to create entries

Examples

open allclose all

Basic Examples  (1)

A Hadamard matrix:

The Hadamard's basis sequences of length 128:

Options  (2)

Method  (1)

Detect sequency values of rows of a Hadamard matrix:

WorkingPrecision  (1)

By default, an exact matrix is computed:

Use machine precision:

Use arbitrary precision:

Properties & Relations  (3)

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:

Wolfram Research (2012), HadamardMatrix, Wolfram Language function, https://reference.wolfram.com/language/ref/HadamardMatrix.html (updated 2023).

Text

Wolfram Research (2012), HadamardMatrix, Wolfram Language function, https://reference.wolfram.com/language/ref/HadamardMatrix.html (updated 2023).

CMS

Wolfram Language. 2012. "HadamardMatrix." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2023. 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

BibTeX

@misc{reference.wolfram_2023_hadamardmatrix, author="Wolfram Research", title="{HadamardMatrix}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/HadamardMatrix.html}", note=[Accessed: 25-September-2023 ]}

BibLaTeX

@online{reference.wolfram_2023_hadamardmatrix, organization={Wolfram Research}, title={HadamardMatrix}, year={2023}, url={https://reference.wolfram.com/language/ref/HadamardMatrix.html}, note=[Accessed: 25-September-2023 ]}