\(\overrightarrow{AC}.\overrightarrow{BD}=\left(\overrightarrow{AD}+\overrightarrow{DC}\right)\left(\overrightarrow{BA}+\overrightarrow{AD}\right)\)
\(=\overrightarrow{AD}.\overrightarrow{BA}+\overrightarrow{AD}^2+\overrightarrow{DC}.\overrightarrow{BA}+\overrightarrow{DC}.\overrightarrow{AD}\)
\(=\overrightarrow{AD}^2-\overrightarrow{AB}.\overrightarrow{DC}=a^2-a.2a=-a^2\)