# Homogeneity of dirac delta

I know that $$\delta(ax) = \frac{1}{|a|}\delta(x)$$ for $$a\neq0$$ in the sense of distributions. However I am confused about the inconsistency of the following computation. Consider $$g\in C^\infty_c(\mathbb{R}^2;\mathbb{R})$$ $$\int_{\mathbb{R}^2} \delta(x-ay)g(x,y)dxdy = \int_{\mathbb{R}} g(ay,y)dy$$ But using $$\delta(x-ay) = \delta(a(\frac{x}{a}- y)) = \frac{1}{|a|}\delta(\frac{x}{a} - y)$$ we compute $$\int_{\mathbb{R}^2}\frac{1}{|a|}\delta(\frac{x}{a} - y)g(x,y)dxdy = \int_{\mathbb{R}} \frac{1}{|a|}g(ay,y)dy \neq \int_{\mathbb{R}}g(ay,y)dy$$ Obviously something is going wrong here. I may be using the homogeneity condition wrong as I know in $$n$$ dimension we have $$\delta(a\mathbf{x}) = \frac{1}{|a|^n}\delta(\mathbf{x})$$

The second computation should be $$\int_{\mathbb{R}^2}\frac{1}{|a|}\delta(\frac{x}{a} - y)g(x,y)dxdy ~=~ \int_{\mathbb{R}} \frac{1}{|a|}g(x,x/a)dx ~\stackrel{x=ay}{=}~ \int_{\mathbb{R}}g(ay,y)dy.$$ In the substitution of the last equality, we exchanged integration limits if $$a<0$$.
The second computation is wrong I realize... It should be $$\int_{\mathbb{R}^2}\frac{1}{|a|}\delta(\frac{x}{a} - y)g(x,y)dxdy = \int_{\mathbb{R}} \frac{1}{|a|}\frac{g(ay,y)}{|\frac{d}{dx}(\frac{x}{a} - y)|}dy = \int_{\mathbb{R}} g(ay,y)dy$$