For every pair n, k of integers in Z, the Haar function ψ_{n, k} is defined on the real line R by the formula
ψ
n
,
k
(
t
)
=
2
n
/
2
ψ
(
2
n
t
−
k
)
,
t
∈
R
.
This function is supported on the rightopen interval I_{n, k} = [ k 2^{−n}, (k+1) 2^{−n }), i.e., it vanishes outside that interval. It has integral 0 and norm 1 in the Hilbert space L^{2}(R),
∫
R
ψ
n
,
k
(
t
)
d
t
=
0
,
∥
ψ
n
,
k
∥
L
2
(
R
)
2
=
∫
R
ψ
n
,
k
(
t
)
2
d
t
=
1.
The Haar functions are pairwise orthogonal,
∫
R
ψ
n
1
,
k
1
(
t
)
ψ
n
2
,
k
2
(
t
)
d
t
=
δ
n
1
,
n
2
δ
k
1
,
k
2
,
where δ_{i,j} represents the Kronecker delta. Here is the reason for orthogonality: when the two supporting intervals
I
n
1
,
k
1
and
I
n
2
,
k
2
are not equal, then they are either disjoint, or else, the smaller of the two supports, say
I
n
1
,
k
1
, is contained in the lower or in the upper half of the other interval, on which the function
ψ
n
2
,
k
2
remains constant. It follows in this case that the product of these two Haar functions is a multiple of the first Haar function, hence the product has integral 0.
The Haar system on the real line is the set of functions
{
ψ
n
,
k
(
t
)
;
n
∈
Z
,
k
∈
Z
}
.
It is complete in L^{2}(R): The Haar system on the line is an orthonormal basis in L^{2}(R).
The Haar wavelet has several notable properties:
 Any continuous real function with compact support can be approximated uniformly by linear combinations of
ϕ
(
t
)
,
ϕ
(
2
t
)
,
ϕ
(
4
t
)
,
…
,
ϕ
(
2
n
t
)
,
…
and their shifted functions. This extends to those function spaces where any function therein can be approximated by continuous functions.
 Any continuous real function on [0, 1] can be approximated uniformly on [0, 1] by linear combinations of the constant function 1,
ψ
(
t
)
,
ψ
(
2
t
)
,
ψ
(
4
t
)
,
…
,
ψ
(
2
n
t
)
,
…
and their shifted functions.
 Orthogonality in the form
∫
−
∞
∞
2
(
n
+
n
1
)
/
2
ψ
(
2
n
t
−
k
)
ψ
(
2
n
1
t
−
k
1
)
d
t
=
δ
n
,
n
1
δ
k
,
k
1
.
Here δ_{i,j} represents the Kronecker delta. The dual function of ψ(t) is ψ(t) itself.
 Wavelet/scaling functions with different scale n have a functional relationship: since
it follows that coefficients of scale
n can be calculated by coefficients of scale
n+1:
If
χ
w
(
k
,
n
)
=
2
n
/
2
∫
−
∞
∞
x
(
t
)
ϕ
(
2
n
t
−
k
)
d
t
and
X
w
(
k
,
n
)
=
2
n
/
2
∫
−
∞
∞
x
(
t
)
ψ
(
2
n
t
−
k
)
d
t
then
In this section, the discussion is restricted to the unit interval [0, 1] and to the Haar functions that are supported on [0, 1]. The system of functions considered by Haar in 1910, called the Haar system on [0, 1] in this article, consists of the subset of Haar wavelets defined as
{
t
∈
[
0
,
1
]
↦
ψ
n
,
k
(
t
)
;
n
∈
N
∪
{
0
}
,
0
≤
k
<
2
n
}
,
with the addition of the constant function 1 on [0, 1].
In Hilbert space terms, this Haar system on [0, 1] is a complete orthonormal system, i.e., an orthonormal basis, for the space L^{2}([0, 1]) of square integrable functions on the unit interval.
The Haar system on [0, 1] —with the constant function 1 as first element, followed with the Haar functions ordered according to the lexicographic ordering of couples (n, k)— is further a monotone Schauder basis for the space L^{p}([0, 1]) when 1 ≤ p < ∞. This basis is unconditional when 1 < p < ∞.
There is a related Rademacher system consisting of sums of Haar functions,
r
n
(
t
)
=
2
−
n
/
2
∑
k
=
0
2
n
−
1
ψ
n
,
k
(
t
)
,
t
∈
[
0
,
1
]
,
n
≥
0.
Notice that r_{n}(t) = 1 on [0, 1). This is an orthonormal system but it is not complete. In the language of probability theory, the Rademacher sequence is an instance of a sequence of independent Bernoulli random variables with mean 0. The Khintchine inequality expresses the fact that in all the spaces L^{p}([0, 1]), 1 ≤ p < ∞, the Rademacher sequence is equivalent to the unit vector basis in ℓ^{2}. In particular, the closed linear span of the Rademacher sequence in L^{p}([0, 1]), 1 ≤ p < ∞, is isomorphic to ℓ^{2}.
The Faber–Schauder system is the family of continuous functions on [0, 1] consisting of the constant function 1, and of multiples of indefinite integrals of the functions in the Haar system on [0, 1], chosen to have norm 1 in the maximum norm. This system begins with s_{0} = 1, then s_{1}(t) = t is the indefinite integral vanishing at 0 of the function 1, first element of the Haar system on [0, 1]. Next, for every integer n ≥ 0, functions s_{n, k} are defined by the formula
s
n
,
k
(
t
)
=
2
1
+
n
/
2
∫
0
t
ψ
n
,
k
(
u
)
d
u
,
t
∈
[
0
,
1
]
,
0
≤
k
<
2
n
.
These functions s_{n, k} are continuous, piecewise linear, supported by the interval I_{n, k} that also supports ψ_{n, k}. The function s_{n, k} is equal to 1 at the midpoint x_{n, k} of the interval I_{n, k}, linear on both halves of that interval. It takes values between 0 and 1 everywhere.
The Faber–Schauder system is a Schauder basis for the space C([0, 1]) of continuous functions on [0, 1]. For every f in C([0, 1]), the partial sum
f
n
+
1
=
a
0
s
0
+
a
1
s
1
+
∑
m
=
0
n
−
1
(
∑
k
=
0
2
m
−
1
a
m
,
k
s
m
,
k
)
∈
C
(
[
0
,
1
]
)
of the series expansion of f in the Faber–Schauder system is the continuous piecewise linear function that agrees with f at the 2^{n} + 1 points k 2^{−n}, where 0 ≤ k ≤ 2^{n}. Next, the formula
f
n
+
2
−
f
n
+
1
=
∑
k
=
0
2
n
−
1
(
f
(
x
n
,
k
)
−
f
n
+
1
(
x
n
,
k
)
)
s
n
,
k
=
∑
k
=
0
2
n
−
1
a
n
,
k
s
n
,
k
gives a way to compute the expansion of f step by step. Since f is uniformly continuous, the sequence {f_{n}} converges uniformly to f. It follows that the Faber–Schauder series expansion of f converges in C([0, 1]), and the sum of this series is equal to f.
The Franklin system is obtained from the Faber–Schauder system by the Gram–Schmidt orthonormalization procedure. Since the Franklin system has the same linear span as that of the Faber–Schauder system, this span is dense in C([0, 1]), hence in L^{2}([0, 1]). The Franklin system is therefore an orthonormal basis for L^{2}([0, 1]), consisting of continuous piecewise linear functions. P. Franklin proved in 1928 that this system is a Schauder basis for C([0, 1]). The Franklin system is also an unconditional basis for the space L^{p}([0, 1]) when 1 < p < ∞. The Franklin system provides a Schauder basis in the disk algebra A(D). This was proved in 1974 by Bočkarev, after the existence of a basis for the disk algebra had remained open for more than forty years.
Bočkarev's construction of a Schauder basis in A(D) goes as follows: let f be a complex valued Lipschitz function on [0, π]; then f is the sum of a cosine series with absolutely summable coefficients. Let T(f) be the element of A(D) defined by the complex power series with the same coefficients,
{
f
:
x
∈
[
0
,
π
]
→
∑
n
=
0
∞
a
n
cos
(
n
x
)
}
⟶
{
T
(
f
)
:
z
→
∑
n
=
0
∞
a
n
z
n
,

z

≤
1
}
.
Bočkarev's basis for A(D) is formed by the images under T of the functions in the Franklin system on [0, π]. Bočkarev's equivalent description for the mapping T starts by extending f to an even Lipschitz function g_{1} on [−π, π], identified with a Lipschitz function on the unit circle T. Next, let g_{2} be the conjugate function of g_{1}, and define T(f) to be the function in A(D) whose value on the boundary T of D is equal to g_{1} + i g_{2}.
When dealing with 1periodic continuous functions, or rather with continuous functions f on [0, 1] such that f(0) = f(1), one removes the function s_{1}(t) = t from the Faber–Schauder system, in order to obtain the periodic Faber–Schauder system. The periodic Franklin system is obtained by orthonormalization from the periodic Faber–Schauder system. One can prove Bočkarev's result on A(D) by proving that the periodic Franklin system on [0, 2π] is a basis for a Banach space A_{r} isomorphic to A(D). The space A_{r} consists of complex continuous functions on the unit circle T whose conjugate function is also continuous.
The 2×2 Haar matrix that is associated with the Haar wavelet is
H
2
=
[
1
1
1
−
1
]
.
Using the discrete wavelet transform, one can transform any sequence
(
a
0
,
a
1
,
…
,
a
2
n
,
a
2
n
+
1
)
of even length into a sequence of twocomponentvectors
(
(
a
0
,
a
1
)
,
…
,
(
a
2
n
,
a
2
n
+
1
)
)
. If one rightmultiplies each vector with the matrix
H
2
, one gets the result
(
(
s
0
,
d
0
)
,
…
,
(
s
n
,
d
n
)
)
of one stage of the fast Haarwavelet transform. Usually one separates the sequences s and d and continues with transforming the sequence s. Sequence s is often referred to as the averages part, whereas d is known as the details part.
If one has a sequence of length a multiple of four, one can build blocks of 4 elements and transform them in a similar manner with the 4×4 Haar matrix
H
4
=
[
1
1
1
1
1
1
−
1
−
1
1
−
1
0
0
0
0
1
−
1
]
,
which combines two stages of the fast Haarwavelet transform.
Compare with a Walsh matrix, which is a nonlocalized 1/–1 matrix.
Generally, the 2N×2N Haar matrix can be derived by the following equation.
H
2
N
=
[
H
N
⊗
[
1
,
1
]
I
N
⊗
[
1
,
−
1
]
]
where
I
N
=
[
1
0
…
0
0
1
…
0
⋮
⋮
⋱
⋮
0
0
…
1
]
and
⊗
is the Kronecker product.
The Kronecker product of
A
⊗
B
, where
A
is an m×n matrix and
B
is a p×q matrix, is expressed as
A
⊗
B
=
[
a
11
B
…
a
1
n
B
⋮
⋱
⋮
a
m
1
B
…
a
m
n
B
]
.
An unnormalized 8point Haar matrix
H
8
is shown below
H
8
=
[
1
1
1
1
1
1
1
1
1
1
1
1
−
1
−
1
−
1
−
1
1
1
−
1
−
1
0
0
0
0
0
0
0
0
1
1
−
1
−
1
1
−
1
0
0
0
0
0
0
0
0
1
−
1
0
0
0
0
0
0
0
0
1
−
1
0
0
0
0
0
0
0
0
1
−
1
]
.
Note that, the above matrix is an unnormalized Haar matrix. The Haar matrix required by the Haar transform should be normalized.
From the definition of the Haar matrix
H
, one can observe that, unlike the Fourier transform,
H
has only real elements (i.e., 1, 1 or 0) and is nonsymmetric.
Take the 8point Haar matrix
H
8
as an example. The first row of
H
8
measures the average value, and the second row of
H
8
measures a low frequency component of the input vector. The next two rows are sensitive to the first and second half of the input vector respectively, which corresponds to moderate frequency components. The remaining four rows are sensitive to the four section of the input vector, which corresponds to high frequency components.
The Haar transform is the simplest of the wavelet transforms. This transform crossmultiplies a function against the Haar wavelet with various shifts and stretches, like the Fourier transform crossmultiplies a function against a sine wave with two phases and many stretches.
The Haar transform is one of the oldest transform functions, proposed in 1910 by the Hungarian mathematician Alfréd Haar. It is found effective in applications such as signal and image compression in electrical and computer engineering as it provides a simple and computationally efficient approach for analysing the local aspects of a signal.
The Haar transform is derived from the Haar matrix. An example of a 4x4 Haar transformation matrix is shown below.
H
4
=
1
2
[
1
1
1
1
1
1
−
1
−
1
2
−
2
0
0
0
0
2
−
2
]
The Haar transform can be thought of as a sampling process in which rows of the transformation matrix act as samples of finer and finer resolution.
Compare with the Walsh transform, which is also 1/–1, but is nonlocalized.
The Haar transform has the following properties
1. No need for multiplications. It requires only additions and there are many elements with zero value in the Haar matrix, so the computation time is short. It is faster than Walsh transform, whose matrix is composed of +1 and −1.
2. Input and output length are the same. However, the length should be a power of 2, i.e.
N
=
2
k
,
k
∈
N
.
3. It can be used to analyse the localized feature of signals. Due to the orthogonal property of the Haar function, the frequency components of input signal can be analyzed.
The Haar transform y_{n} of an ninput function x_{n} is
y
n
=
H
n
x
n
The Haar transform matrix is real and orthogonal. Thus, the inverse Haar transform can be derived by the following equations.
H
=
H
∗
,
H
−
1
=
H
T
,
i.e.
H
H
T
=
I
where
I
is the identity matrix. For example, when n = 4
H
4
T
H
4
=
1
2
[
1
1
2
0
1
1
−
2
0
1
−
1
0
2
1
−
1
0
−
2
]
⋅
1
2
[
1
1
1
1
1
1
−
1
−
1
2
−
2
0
0
0
0
2
−
2
]
=
[
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
]
Thus, the inverse Haar transform is
x
n
=
H
T
y
n
The Haar transform coefficients of a n=4point signal
x
4
=
[
1
,
2
,
3
,
4
]
T
can be found as
y
4
=
H
4
x
4
=
1
2
[
1
1
1
1
1
1
−
1
−
1
2
−
2
0
0
0
0
2
−
2
]
[
1
2
3
4
]
=
[
5
−
2
−
1
/
2
−
1
/
2
]
The input signal can then be perfectly reconstructed by the inverse Haar transform
x
4
^
=
H
4
T
y
4
=
1
2
[
1
1
2
0
1
1
−
2
0
1
−
1
0
2
1
−
1
0
−
2
]
[
5
−
2
−
1
/
2
−
1
/
2
]
=
[
1
2
3
4
]
Modern cameras are capable of producing images with resolutions in the range of tens of megapixels. These images need to be compressed before storage and transfer. The Haar transform can be used for image compression. The basic idea is to transfer the image into a matrix in which each element of the matrix represents a pixel in the image. For example, a 256×256 matrix is saved for a 256×256 image. JPEG image compression involves cutting the original image into 8×8 subimages. Each subimage is an 8×8 matrix.
The 2D Haar transform is required. The equation of the Haar transform is
B
n
=
H
n
A
n
H
n
T
, where
A
n
is a n×n matrix and
H
n
is npoint Haar transform. The inverse Haar transform is
A
n
=
H
n
T
B
n
H
n