Answer:
![m=\dfrac{3}{2}](https://tex.z-dn.net/?f=m%3D%5Cdfrac%7B3%7D%7B2%7D)
Step-by-step explanation:
Given points are: ( 1 , 3 ) , ( 2 , 3 ) and ( 3 , 6 )
The average of x-coordinate will be:
![\overline{x} = \dfrac{x_1+x_2+x_3}{\text{number of points}}](https://tex.z-dn.net/?f=%5Coverline%7Bx%7D%20%3D%20%5Cdfrac%7Bx_1%2Bx_2%2Bx_3%7D%7B%5Ctext%7Bnumber%20of%20points%7D%7D)
<u>1) Finding
</u>
- Average of the x coordinates:
![\overline{x} = \dfrac{1+2+3}{3}](https://tex.z-dn.net/?f=%5Coverline%7Bx%7D%20%3D%20%5Cdfrac%7B1%2B2%2B3%7D%7B3%7D)
![\overline{x} = 2](https://tex.z-dn.net/?f=%5Coverline%7Bx%7D%20%3D%202)
- Average of the y coordinates:
similarly for y
![\overline{y} = \dfrac{3+3+6}{3}](https://tex.z-dn.net/?f=%5Coverline%7By%7D%20%3D%20%5Cdfrac%7B3%2B3%2B6%7D%7B3%7D)
![\overline{y} = 4](https://tex.z-dn.net/?f=%5Coverline%7By%7D%20%3D%204)
<u>2) Finding the line through
with slope m.</u>
Given a point and a slope, the equation of a line can be found using:
![(y-y_1)=m(x-x_1)](https://tex.z-dn.net/?f=%28y-y_1%29%3Dm%28x-x_1%29)
in our case this will be
![(y-\overline{y})=m(x-\overline{x})](https://tex.z-dn.net/?f=%28y-%5Coverline%7By%7D%29%3Dm%28x-%5Coverline%7Bx%7D%29)
![(y-4)=m(x-2)](https://tex.z-dn.net/?f=%28y-4%29%3Dm%28x-2%29)
![y=mx-2m+4](https://tex.z-dn.net/?f=y%3Dmx-2m%2B4)
this is our equation of the line!
<u>3) Find the squared vertical distances between this line and the three points.</u>
So what we up till now is a line, and three points. We need to find how much further away (only in the y direction) each point is from the line.
- Distance from point (1,3)
We know that when x=1, y=3 for the point. But we need to find what does y equal when x=1 for the line?
we'll go back to our equation of the line and use x=1.
![y=m(1)-2m+4](https://tex.z-dn.net/?f=y%3Dm%281%29-2m%2B4)
![y=-m+4](https://tex.z-dn.net/?f=y%3D-m%2B4)
now we know the two points at x=1: (1,3) and (1,-m+4)
to find the vertical distance we'll subtract the y-coordinates of each point.
![d_1=3-(-m+4)](https://tex.z-dn.net/?f=d_1%3D3-%28-m%2B4%29)
![d_1=m-1](https://tex.z-dn.net/?f=d_1%3Dm-1)
finally, as asked, we'll square the distance
![(d_1)^2=(m-1)^2](https://tex.z-dn.net/?f=%28d_1%29%5E2%3D%28m-1%29%5E2)
- Distance from point (2,3)
we'll do the same as above here:
![y=m(2)-2m+4](https://tex.z-dn.net/?f=y%3Dm%282%29-2m%2B4)
![y=4](https://tex.z-dn.net/?f=y%3D4)
vertical distance between the two points: (2,3) and (2,4)
![d_2=3-4](https://tex.z-dn.net/?f=d_2%3D3-4)
squaring:
![(d_2)^2=1](https://tex.z-dn.net/?f=%28d_2%29%5E2%3D1)
- Distance from point (3,6)
![y=m(3)-2m+4](https://tex.z-dn.net/?f=y%3Dm%283%29-2m%2B4)
![y=m+4](https://tex.z-dn.net/?f=y%3Dm%2B4)
vertical distance between the two points: (3,6) and (3,m+4)
![d_3=6-(m+4)](https://tex.z-dn.net/?f=d_3%3D6-%28m%2B4%29)
squaring:
![(d_3)^2=(2-m)^2](https://tex.z-dn.net/?f=%28d_3%29%5E2%3D%282-m%29%5E2)
3) Add up all the squared distances, we'll call this value R.
![R=(d_1)^2+(d_2)^2+(d_3)^2](https://tex.z-dn.net/?f=R%3D%28d_1%29%5E2%2B%28d_2%29%5E2%2B%28d_3%29%5E2)
![R=(m-1)^2+4+(2-m)^2](https://tex.z-dn.net/?f=R%3D%28m-1%29%5E2%2B4%2B%282-m%29%5E2)
<u>4) Find the value of m that makes R minimum.</u>
Looking at the equation above, we can tell that R is a function of m:
![R(m)=(m-1)^2+4+(2-m)^2](https://tex.z-dn.net/?f=R%28m%29%3D%28m-1%29%5E2%2B4%2B%282-m%29%5E2)
you can simplify this if you want to. What we're most concerned with is to find the minimum value of R at some value of m. To do that we'll need to derivate R with respect to m. (this is similar to finding the stationary point of a curve)
![\dfrac{d}{dm}\left(R(m)\right)=\dfrac{d}{dm}\left((m-1)^2+4+(2-m)^2\right)](https://tex.z-dn.net/?f=%5Cdfrac%7Bd%7D%7Bdm%7D%5Cleft%28R%28m%29%5Cright%29%3D%5Cdfrac%7Bd%7D%7Bdm%7D%5Cleft%28%28m-1%29%5E2%2B4%2B%282-m%29%5E2%5Cright%29)
![\dfrac{dR}{dm}=2(m-1)+0+2(2-m)(-1)](https://tex.z-dn.net/?f=%5Cdfrac%7BdR%7D%7Bdm%7D%3D2%28m-1%29%2B0%2B2%282-m%29%28-1%29)
now to find the minimum value we'll just use a condition that
![0=2(m-1)+2(2-m)(-1)](https://tex.z-dn.net/?f=0%3D2%28m-1%29%2B2%282-m%29%28-1%29)
now solve for m:
![0=2m-2-4+2m](https://tex.z-dn.net/?f=0%3D2m-2-4%2B2m)
![m=\dfrac{3}{2}](https://tex.z-dn.net/?f=m%3D%5Cdfrac%7B3%7D%7B2%7D)
This is the value of m for which the sum of the squared vertical distances from the points and the line is small as possible!