Transform binary basis states and sampled waveforms efficiently. Pick scaling, see steps, and verify energy. Download tables, share plots, and reuse numbers anywhere fast.
The Hadamard matrix is built recursively using Sylvester’s construction: H₁ = [1], and H₂N = [[H_N, H_N], [H_N, −H_N]].
For a length N vector x, the transform is y = s · H_N · x, where s is the selected scaling factor. With orthonormal scaling, s = 1/√N, so the transform is energy-preserving.
This page uses the fast Walsh–Hadamard algorithm, which applies butterfly additions and subtractions in N log₂(N) steps.
Example input x = [1, 0, 0, 0] with orthonormal scaling produces y = [0.5, 0.5, 0.5, 0.5].
| Index | Input x[k] | Output y[k] |
|---|---|---|
| 0 | 1 | 0.5 |
| 1 | 0 | 0.5 |
| 2 | 0 | 0.5 |
| 3 | 0 | 0.5 |
The Hadamard transform converts a length N vector into coefficients using a matrix whose entries are only +1 and −1. For this calculator, N must be 2^n, so the basis forms orthogonal sign patterns that are easy to compute and interpret in practice.
Start with H₁ = [1]. Build higher orders by H₂N = [[H_N, H_N], [H_N, −H_N]]. Multiplying y = H_N x mixes samples by repeated sums and differences, producing coefficients aligned to increasingly rapid sign changes across the index. This structure is why the transform can be implemented without explicitly forming the full matrix.
Orthonormal scaling multiplies results by 1/√N, making the transform unitary and preserving energy: ∑x[k]² = ∑y[k]². Unscaled mode uses factor 1, which keeps integer arithmetic for integer inputs and matches many coding and multiplexing conventions found in instrumentation.
A direct multiply costs about N² additions, but the Fast Hadamard Transform needs N log₂N butterfly operations. For N=1024, that is 1024×10 = 10240 sum/difference pairs, far below 1024², enabling rapid batch evaluation of many vectors.
In quantum information, the Hadamard gate creates equal-amplitude superpositions: |0⟩ → (|0⟩+|1⟩)/√2 and |1⟩ → (|0⟩−|1⟩)/√2. In wave-based experiments, Hadamard coding can multiplex channels so each measurement combines multiple sources with known ± patterns, improving throughput when noise is dominated by detector readout limits.
The first coefficient summarizes the overall level: in unscaled mode, y[0] = ∑x[k]. Higher coefficients correspond to structured alternations, similar to analyzing a signal with progressively finer square-wave masks. If your input has symmetry or sparse changes, energy often concentrates into fewer coefficients, which supports compression, denoising, and fast correlation-style comparisons.
Because the algorithm uses only additions and subtractions, it is numerically stable, but decimals can still accumulate small rounding differences for long vectors. This calculator accepts fractions like 1/3 for exact entry. Keep consistent units and significant figures when importing measured data to avoid misleading small coefficients.
For repeatable results, record the input vector, N, and the selected normalization. The CSV export captures values in a machine-friendly format for re-analysis, while the PDF export preserves the displayed table and summary stats for lab notes, assignments, or review by collaborators.
Enter N values where N is a power of two (2, 4, 8, …). If needed, pad with zeros to the next power of two.
Use orthonormal (1/√N) for energy-preserving results and fair magnitude comparisons. Use unscaled (1) for integer-style outputs and some coding conventions.
Yes. Orthonormal mode is its own inverse. In unscaled mode, applying the transform twice returns N·x, so divide by N.
No. Fourier uses sinusoidal basis functions. Hadamard uses ±1 sign patterns. Both are orthogonal transforms, but they highlight different structures.
With orthonormal scaling, coefficients include a 1/√N factor. That can turn sums into smaller values, especially for the first “DC-like” term.
They are pairwise updates: (a+b) and (a−b). Repeating them across log₂N stages computes the full transform efficiently.
Save the input vector, N, and normalization choice. Export CSV for analysis workflows and PDF for printable records with the displayed table.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.