Gọi tọa độ trực tâm H là \(H\left(x;y\right).\)
Vì H là trực tâm của △ ABC. \(\Rightarrow\left\{{}\begin{matrix}\overrightarrow{AH}\perp\overrightarrow{BC.}\\\overrightarrow{BH}\perp\overrightarrow{AC.}\end{matrix}\right.\) \(\Leftrightarrow\left\{{}\begin{matrix}\overrightarrow{AH}.\overrightarrow{BC}=0.\\\overrightarrow{BH}.\overrightarrow{AC}=0.\end{matrix}\right.\)
Ta có: \(\overrightarrow{AH}=\left(x-2;y-4\right);\overrightarrow{BC}=\left(-1;-5\right).\)
\(\overrightarrow{BH}=\left(x+1;y-2\right);\overrightarrow{AC}=\left(-4;-7\right).\)
\(\Rightarrow\left\{{}\begin{matrix}\left(x-2\right)\left(-1\right)+\left(y-4\right)\left(-5\right)=0.\\\left(x+1\right)\left(-4\right)+\left(y-2\right)\left(-7\right)=0.\end{matrix}\right.\) \(\Leftrightarrow\left\{{}\begin{matrix}-x+2-5y+20=0.\\-4x-4-7y+14=0.\end{matrix}\right.\)
\(\Leftrightarrow\left\{{}\begin{matrix}-x-5y=-22.\\-4x-7y=-10.\end{matrix}\right.\Leftrightarrow\left\{{}\begin{matrix}x=-8.\\y=6.\end{matrix}\right.\) \(\Rightarrow H\left(-8;6\right).\)