What is $\int\delta(x-y)\delta(y-z)f(y)\:{\rm d}y$? Let $(\Omega,\mathcal A,\mu)$ be a measurable space and $\delta$ denote the Dirac delta function. If $f\in\mathcal L^1(\mu)$ and $x,z\in\Omega$, what is $$\int\delta(x-y)\delta(y-z)f(y)\:\mu({\rm d}y)?$$ I've found that in a paper, but isn't that undefined?
 A: Talking non-rigorously, $\delta(x-y) \delta(y-z) f(y)$ will be non-zero only when $x-y=0$ and $y-z=0$, i.e. when $x=y=z.$ Therefore the integral over $y$ would be non-zero only when $x=z.$ We can thus expect the integral to be a multiple of $\delta(x-z).$
So, let $\phi$ be a nice function and study the formal integral
$$
\int \left( \int \delta(x-y) \delta(y-z) f(y) \, dy \right) \phi(z) \, dz.
$$
Swapping the order of integration gives
$$
\int \delta(x-y) \left( \int \delta(y-z) \phi(z) \, dz \right) f(y) \, dy
= \int \delta(x-y) \phi(y) f(y) \, dy
= \phi(x) f(x).
$$
Thus,
$$
\int \delta(x-y) \delta(y-z) f(y) \, dy = f(x) \delta(z-x).
$$
A: Recall the usual $\int\delta(x-y)g(y)dy=g(x)$ (assuming it's a definite integral over $A$), in this case with $g(y):=f(y)\delta(y-z)$, giving $\color{blue}{f(x)\delta(x-z)}$ for your in-title integral (again, if it's definite over $A$). Here we've eliminated the $\delta$ containing $x$, effectively imposing $y=x$. Of course we could have used the other $\delta$ to impose $y=z$ instead, obtaining $\color{blue}{f(z)\delta(x-z)}$. But by inspection, these two answers are equivalent.
A: $$\color{green}{\delta(x\!-\!z)}\tag{1a}$$and$$\color{red}{\int_{\mathbb{R}} \!\mathrm{d}y ~f(y)\delta(x\!-\!y)\delta(y\!-\!z)}\tag{1b}$$ are informal notations for the distributions
$u,v\in D^{\prime}(\mathbb{R}^2)$ given by$^1$
$$u[\varphi]~:=~\int_{\mathbb{R}} \!\mathrm{d}y~\varphi(y,y),\tag{2a}$$
$$v[\varphi]~:=~\int_{\mathbb{R}} \!\mathrm{d}y ~f(y)~\varphi(y,y),\tag{2b} $$
respectively, where $\varphi\in D(\mathbb{R}^2)$ is a test function. The distributions are written in the informal notation as
$$u[\varphi]~=~\int_{\mathbb{R}^2} \!\mathrm{d}x~\mathrm{d}z~\color{green}{\delta(x\!-\!z)}~ \varphi(x,z), \tag{3a}$$
$$v[\varphi]~:=~\int_{\mathbb{R}^2} \!\mathrm{d}x~\mathrm{d}z~\color{red}{\int_{\mathbb{R}} \!\mathrm{d}y ~f(y)\delta(x\!-\!y)\delta(y\!-\!z)} ~\varphi(x,z),\tag{3b} $$
respectively.
--
$^1$Disclaimer: Here we assume for simplicity that OP's space is $\Omega=\mathbb{R}$ and the measure $\mu$ is the Lebesgue measure. Note that e.g. boundaries $\partial \Omega$ often requires extra attention in distribution theory.
