# convolution of Haar wavelet functions

Haar wavelet functions are defined as

$$\psi (x)={\begin{cases}1\quad &0\leq x<{\frac {1}{2}},\\ -1&{\frac {1}{2}}\leq x<1,\\ 0&{\mbox{otherwise.}} \end{cases}}$$

$$\psi_{j,k}(x):=\psi(2^jx−k)$$

We are interested in finding the closed-form expression for $f(j_1,j_2,k_1,k_2,y)$ of the convolution:

$$\int _{\mathbb {R}}\psi _{j_{1},k_{1}}(x)\psi _{j_{2},k_{2}}(y-x)\,dx=f(j_1,j_2,k_1,k_2,y).$$

Because $\psi_{j_1,k_1}(x)$ is nonzero only in the interval $$x\in I_{n_1,k_1} =\frac{1}{2^{n_1}} [ k_1, k_1+1),$$ and $\psi_{j_2,k_2}(y-x)$ is nonzero only in the interval $$x\in J_{n_2,k_2}(y): =y+\frac{1}{2^{n_2}} (-(k_2+1), -k_2],$$ Thus a necessary condition for $f$ to be nonzero is that the intervals $I_{n_1,k_1},J_{n_2,k_2}(y)$ overlap.

Thanks!

• Why don't you simply calculate the integral? What is stopping you? – b00n heT Aug 1 '17 at 8:23
• $\psi_k(x) = 2^k (1_{[0,2^{-k}]}-1_{[-2^{-k},0]})$. So $$1_{[a,b]} \ast 1_{[c,d]} = ?$$ – reuns Aug 1 '17 at 8:24
• Since the convolution of two constants is linear and the convolutional factors are piecewise constants. It will be piecewise linear function. – mathreadler Aug 1 '17 at 9:03
• I did not see that you had different scales in mind, the picture in my answer only valid if $k_1=k_2$ and also the packet analyses. – mathreadler Aug 1 '17 at 9:26
• However one often normalize to get an ON-system or the shorter wavelets energy would diminish too quickly if their amplitude remained 1. I think it is a factor of $\sqrt{2^j}$ or something for $L_2$ normalization. – mathreadler Aug 1 '17 at 10:02

If $f(x) = 1_{[0,a]}-1_{[-a,0]}, g(x) = 1_{[0,b]}-1_{[-b,0]}$ then $$h(x) = f\ast g(x), \qquad h'(x) = f \ast g'(x) = 2 f(x)-f(x+b)-f(x-b)$$

$$h(x) = \int_{-\infty}^x h'(y)dy = 2F(x)-F(x+b)-F(x-b), \\ F(x) = \int_{-\infty}^x f(y)dy = a(|x/a|-1) 1_{|x| < a}$$

• Thanks for the answer. – mike Aug 1 '17 at 13:34
• Since your $F(x)$ is symmetric in $x$, your $h(x)$ is symmetric in $x$ as well. This is a special case of the expression I seek. I will try to add the offset later. Thanks! – mike Aug 1 '17 at 14:08

Important to note for the special case $j_1=j_2$, we have:

From

1. The convolutional factors being piecewise constants
2. The convolution between two constants is a line.

You can derive that the resulting convolution should be piecewise linear.

Here is what it will look like

And as it should be, since the wavelet function is an approximation to a first order differential operator, it is a primitive kind of approximation to a second order differential operator.

In fact, this is the wavelet function of a wavelet packet corresponding to iterating the high pass band twice, that you get if you deviate from the usual dyadic filterbank structure which only iterates the low pass channel. If you are curious about this you can read more about wavelet packet decomposition.

However in the general case the scales $j_1\neq j_2$, we will still get a piecewise linear function, but with a slightly different look:

• Thanks a lot for the answer. I tested several numerical combinations of $(j_1,k_1,j_2,k_2)$ and got similar plots like you showed. – mike Aug 1 '17 at 13:26