Answer
$d=\frac{|3m+3|}{\sqrt{m^2+1}}$
The distance is 0 when $m=-1$.
A distance of 0 means that $(3,1)$ lies on the line.
Work Step by Step
To use the point-to-line distance formula, we must first find the variables $A,B,C$. This can be done by rewriting the equation $y=mx+4$ in the form $Ax+By+C=0$
$mx-y+4=0$
By writing it in this form we can see that $A=m, B=-1, C=4$
Now we can use the point-to-line distance formula:
$d=\frac{|Ax_{1}+By_{1}+C|}{\sqrt{A^2+B^2}}$
$d=\frac{|mx_{1}-y_{1}+4|}{\sqrt{m^2+(-1)^2}}$
$d=\frac{|3m-1+4|}{\sqrt{m^2+1}}$
$d=\frac{|3m+3|}{\sqrt{m^2+1}}$
The graph plots $m$ on the x-axis and $d$ on the y-axis. It shows that the distance is 0 when $m = -1$. This happens because the point $(3,1)$ lies on the line $y=mx+4$ when $m=-1$.