Solution:-
Let ABC be the triangle with vertices A(2,−2),B(1,1) and C(−1,0)&AD be the altitude of △ABC drawn from A.
Let m1&m2 be the slope of line AD and BC respectively.
Now, AD⊥BC
∴m1×m2=−1
⇒m1=−1m2⟶(i)
Slope of line BC-
Slope of a line joining points (x1,y1)&(x2,y2)=y2−y1x2−x1
∴ Slope of BC joining B(1,1)&C(−1,0)=0−1−1−1=−1−2=12
On substituting the value of m2 in eqn(i), we get
m1=−1(12)=−2
The equation of line passing through the point (x1,y1) with slope m is-
y−y1=m(x−x1)
∴ Equation of altitude AD passing through A(2,−2) with slope 2 is-
y−(−2)=−2×(x−2)
⇒y+2=−2x+4
⇒y=−2x+2