Giả sử d có 1 vtpt là \(\left(a;b\right)\) với \(a^2+b^2\ne0\)
\(cos45^0=\frac{\left|a.2+b.\left(-1\right)\right|}{\sqrt{a^2+b^2}.\sqrt{2^2+\left(-1\right)^2}}=\frac{1}{\sqrt{2}}\)
\(\Leftrightarrow2\left(2a-b\right)^2=5a^2+5b^2\)
\(\Leftrightarrow2\left(4a^2-4ab+b^2\right)=5a^2+5b^2\)
\(\Leftrightarrow3a^2-8ab-3b^2=0\)
\(\Leftrightarrow\left(a-3b\right)\left(3a+b\right)=0\Rightarrow\left[{}\begin{matrix}a=3b\\b=-3a\end{matrix}\right.\)
Chọn \(\left(a;b\right)=\left[{}\begin{matrix}\left(3;1\right)\\\left(1;-3\right)\end{matrix}\right.\)
Có 2 đường thẳng thỏa mãn: \(\left[{}\begin{matrix}3\left(x-1\right)+1\left(y-1\right)=0\\1\left(x-1\right)-3\left(y-1\right)=0\end{matrix}\right.\)