Let AD be the altitude of the triangle from vertex A.

$ \therefore AD \perp BC$

Hence equation of the line passing through the point (2,3) (4,-1) and having a slope 1 is

$(y-3)=1(x-2)$ $ \Rightarrow x-y+1=0$

Length of AD = length of the perpendicular from A(2,3) to BC.

Slope of the line is $ \large\frac{y_2-y_1}{x_2-x_1}$$ = \large\frac{2+1}{1-4}$$=-1$

$ \therefore $ The equation of BC is

$ (y+1)=-1(x-4)$

$ \Rightarrow (y+1)=-1(x-4)$

$ \Rightarrow x+y-3=0$------------(1)

Now the perpendicular distance (d) of a line $Ax+By+C=0$ from a point $(x_1, y_1)$ is $ d = \large\frac{|Ax_1+By_1+C|}{\sqrt{A^2+B^2}}$

On comparing the above equation with equation (1), we get

A=1, B=1 and C=-3

$ \therefore $ length of the altitude $AD = \large\frac{|1 \times 2 +1 \times 3-3|}{\sqrt {1^2+1^2}}$

$ = \large\frac{|2|}{\sqrt 2}$ units.

$ \sqrt 2$ units.

Hence the equation of the altitude from vertex A is $x-y=1$ and length of the altitude = $ \sqrt 2$ units.