Diagonal of a rectangle of lenght l and width w :
$${\sqrt{{{\mathtt{l}}}^{{\mathtt{2}}}{\mathtt{\,\small\textbf+\,}}{{\mathtt{w}}}^{{\mathtt{2}}}}}$$
Note: For a square, l=w so:
$${\sqrt{{{\mathtt{c}}}^{{\mathtt{2}}}{\mathtt{\,\small\textbf+\,}}{{\mathtt{c}}}^{{\mathtt{2}}}}} = {\sqrt{{\mathtt{2}}{\mathtt{\,\times\,}}{{\mathtt{c}}}^{{\mathtt{2}}}}} = {\sqrt{{{\mathtt{c}}}^{{\mathtt{2}}}}}{\mathtt{\,\times\,}}{\sqrt{{\mathtt{2}}}} = {\mathtt{c}}{\mathtt{\,\times\,}}{\sqrt{{\mathtt{2}}}}$$
Diagonal of a rectangle of lenght l and width w :
$${\sqrt{{{\mathtt{l}}}^{{\mathtt{2}}}{\mathtt{\,\small\textbf+\,}}{{\mathtt{w}}}^{{\mathtt{2}}}}}$$
Note: For a square, l=w so:
$${\sqrt{{{\mathtt{c}}}^{{\mathtt{2}}}{\mathtt{\,\small\textbf+\,}}{{\mathtt{c}}}^{{\mathtt{2}}}}} = {\sqrt{{\mathtt{2}}{\mathtt{\,\times\,}}{{\mathtt{c}}}^{{\mathtt{2}}}}} = {\sqrt{{{\mathtt{c}}}^{{\mathtt{2}}}}}{\mathtt{\,\times\,}}{\sqrt{{\mathtt{2}}}} = {\mathtt{c}}{\mathtt{\,\times\,}}{\sqrt{{\mathtt{2}}}}$$