In raw stress, what does putting $\sum_{i <j} d_{ij}$ in denominator do?
That is
$$\frac{\sum_{i<j}(\hat{d_{ij}}-d_{ij})^2}{\sum_{i<j} d_{ij}^2}$$
Where the nominator is the raw stress.
I know that this makes raw stress invariant under stretching and shrinking (transformations). However I have troubles understanding why.
If you scale all your coordinates by a factor $\alpha > 0$, then you end up with $\hat{d}'_{ij} = \alpha\hat{d}_{ij}$ and ${d}'_{ij} = \alpha{d}_{ij}$, for which $$ \sum_{i<j} \frac{(\hat{d}'_{ij}-d'_{ij})^2}{{d'}_{ij}^2} = \sum_{i<j} \frac{(\alpha\hat{d}_{ij}-\alpha d_{ij})^2}{(\alpha d_{ij})^2} = \sum_{i<j} \frac{\alpha^2(\hat{d}_{ij}- d_{ij})^2}{\alpha^2 d_{ij})} = \sum_{i<j} \frac{(\hat{d}_{ij}- d_{ij})^2}{ d_{ij})} $$ so you get invariance by rescaling (stretching and shrinking). (You can check that without the renormalization, you would get a factor $\alpha^2$).
Note that this also is invariant is you rescale coordinates with different factors (i.e., a possibly different scaling factor $\alpha_{ij} $ for every $i<j$, instead of the same $\alpha$ everywhere).