Does anybody know a reference or attribution for this identity? $$ \det \begin{pmatrix} 0 & {a_{12}}^2 & {a_{13}}^2 & {a_{14}}^2 \\ {a_{12}}^2 & 0 & {a_{23}}^2 & {a_{24}}^2 \\ {a_{13}}^2 & {a_{23}}^2 & 0 & {a_{34}}^2 \\ {a_{14}}^2 & {a_{24}}^2 & {a_{34}}^2 & 0 \end{pmatrix} =\\ (a_{12} a_{34} + a_{13}a_{24} + a_{14} a_{23}) (a_{12} a_{34} - a_{13}a_{24} - a_{14} a_{23}) (-a_{12} a_{34} + a_{13}a_{24} - a_{14} a_{23}) (-a_{12} a_{34} - a_{13}a_{24} + a_{14} a_{23}) $$
I found the related identity $$ \det \begin{pmatrix} 0 & {a_{12}} & {a_{13}}^2 & {a_{14}}^2 \\ {a_{12}}^2 & 0 & {a_{23}}^2 & {a_{24}}^2 \\ {a_{13}}^2 & {a_{23}}^2 & 0 & {a_{34}}^2 \\ {a_{14}}^2 & {a_{24}}^2 & {a_{34}}^2 & 0 \end{pmatrix} = \det \begin{pmatrix} 0 & {a_{12}a_{34}} & {a_{13}a_{24}} & {a_{14}a_{23}} \\ {a_{12}a_{34}} & 0 & {a_{14}a_{23}} & {a_{13}a_{24}} \\ {a_{13}a_{24}} & {a_{14}a_{23}} & 0 & {a_{12}a_{34}} \\ {a_{14}a_{23}} & {a_{13}a_{24}} & {a_{12}a_{34}} & 0 \end{pmatrix} $$ in Muir's Treatise on the Theory of Determinants (1882), p. 41, but I'm interested in the factorization.
The dehomogenized identity with $\,a_{j4}=1\,$ is Heron's formula written in terms of a Cayley–Menger determinant.
$$ \frac{1}{4}\sqrt{(a+b+c)(-a+b+c)(a-b+c)(a+b-c)} \;=\; \frac{1}{4}\sqrt{\,- \begin{vmatrix} 0 & a^2 & b^2 & 1 \\ a^2 & 0 & c^2 & 1 \\ b^2 & c^2 & 0 & 1 \\ 1 & 1 & 1 & 0 \end{vmatrix}} $$