Answer:
![m=(3)/(2)](https://img.qammunity.org/2021/formulas/mathematics/college/1or0v718o1b0w9ydbhagozrmyd3bnlugbw.png)
Explanation:
Given points are: ( 1 , 3 ) , ( 2 , 3 ) and ( 3 , 6 )
The average of x-coordinate will be:
![\overline{x} = \frac{x_1+x_2+x_3}{\text{number of points}}](https://img.qammunity.org/2021/formulas/mathematics/college/yqnji4b8zi787dn96z65kh2u1irqowhpo6.png)
1) Finding
![(\overline{x},\overline{y})](https://img.qammunity.org/2021/formulas/mathematics/college/vuo8yqtcif0acvatp7a5vvvavjy7m4kg7c.png)
- Average of the x coordinates:
![\overline{x} = (1+2+3)/(3)](https://img.qammunity.org/2021/formulas/mathematics/college/reicsvgxejgyb5auhi1l0skaum8nll7r27.png)
![\overline{x} = 2](https://img.qammunity.org/2021/formulas/mathematics/college/o1jr4obublz6t0jbtaem13ytymtkm5ow3u.png)
- Average of the y coordinates:
similarly for y
![\overline{y} = (3+3+6)/(3)](https://img.qammunity.org/2021/formulas/mathematics/college/g76k47nna4ayy1hd02wzfl2wmcbvuoz4lr.png)
![\overline{y} = 4](https://img.qammunity.org/2021/formulas/mathematics/college/v0bqgkc9us3u5diolxs3t2hy7vmdo4pr6g.png)
2) Finding the line through
with slope m.
Given a point and a slope, the equation of a line can be found using:
![(y-y_1)=m(x-x_1)](https://img.qammunity.org/2021/formulas/mathematics/middle-school/crnmklyc8uqspr7t9ac18746rgcllvzd2b.png)
in our case this will be
![(y-\overline{y})=m(x-\overline{x})](https://img.qammunity.org/2021/formulas/mathematics/college/4g72jy0spl6shsucvvtox1mn2tbjr6ak74.png)
![(y-4)=m(x-2)](https://img.qammunity.org/2021/formulas/mathematics/college/ma8yhy6cn5yigxd3sy8avdrnsqkl86xdv2.png)
![y=mx-2m+4](https://img.qammunity.org/2021/formulas/mathematics/college/pq9zuh7htgummbkjvaautlpwr9mtsnfj75.png)
this is our equation of the line!
3) Find the squared vertical distances between this line and the three points.
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://img.qammunity.org/2021/formulas/mathematics/college/i9oth9ebgsdqinrh2a8xe226siba1flo7a.png)
![y=-m+4](https://img.qammunity.org/2021/formulas/mathematics/college/7myid51flf2vn365lgsznoetdmaq1tuspq.png)
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://img.qammunity.org/2021/formulas/mathematics/college/idx4k9djp692fteibi9geyx35vdm2l8hor.png)
![d_1=m-1](https://img.qammunity.org/2021/formulas/mathematics/college/poig673u87jzox20vd3s7zdmjz3neojjrp.png)
finally, as asked, we'll square the distance
![(d_1)^2=(m-1)^2](https://img.qammunity.org/2021/formulas/mathematics/college/i3ejuq8yxg01ms5j4ujuz8ek33nosfm8nm.png)
- Distance from point (2,3)
we'll do the same as above here:
![y=m(2)-2m+4](https://img.qammunity.org/2021/formulas/mathematics/college/wsqyspx6mp9h1fd0m328rs233em2afbco5.png)
![y=4](https://img.qammunity.org/2021/formulas/mathematics/college/m1jhp5ycpnzo8s03nldtr3h8xv8z64upeu.png)
vertical distance between the two points: (2,3) and (2,4)
![d_2=3-4](https://img.qammunity.org/2021/formulas/mathematics/college/u37k8tcky08xfczqzmukd14d9o8ert2sa3.png)
squaring:
![(d_2)^2=1](https://img.qammunity.org/2021/formulas/mathematics/college/ijmrtisskn4qp8vy6thdj6qqeja4ug1yw5.png)
- Distance from point (3,6)
![y=m(3)-2m+4](https://img.qammunity.org/2021/formulas/mathematics/college/vyte0lkona2p8kk7e6uxvzvn04mvl8tblk.png)
![y=m+4](https://img.qammunity.org/2021/formulas/mathematics/college/z3l58ziyrgp8icl3dtm7mbtbrn64plzals.png)
vertical distance between the two points: (3,6) and (3,m+4)
![d_3=6-(m+4)](https://img.qammunity.org/2021/formulas/mathematics/college/2xk5a4a8741rc1a1n12ue3h0lmoxyo63ad.png)
squaring:
![(d_3)^2=(2-m)^2](https://img.qammunity.org/2021/formulas/mathematics/college/bymo90cwkv67rkeqc59f4mwdp44wtb666b.png)
3) Add up all the squared distances, we'll call this value R.
![R=(d_1)^2+(d_2)^2+(d_3)^2](https://img.qammunity.org/2021/formulas/mathematics/college/5shpp6ixosuv6rxwfm6wx23o1uxkoc2ayp.png)
![R=(m-1)^2+4+(2-m)^2](https://img.qammunity.org/2021/formulas/mathematics/college/2qqs1cqz6351r8kx6fjw51z7dx5ax8b1v0.png)
4) Find the value of m that makes R minimum.
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://img.qammunity.org/2021/formulas/mathematics/college/zt7er9yzqvm7ll51ejj6ytdupnwpf3odqu.png)
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)
![(d)/(dm)\left(R(m)\right)=(d)/(dm)\left((m-1)^2+4+(2-m)^2\right)](https://img.qammunity.org/2021/formulas/mathematics/college/tcmax8koehhm1iv1oy8uggx35uf21auyb9.png)
![(dR)/(dm)=2(m-1)+0+2(2-m)(-1)](https://img.qammunity.org/2021/formulas/mathematics/college/n7zxhw152sjyyyd8mohhe9r4ftac1rj3n7.png)
now to find the minimum value we'll just use a condition that
![0=2(m-1)+2(2-m)(-1)](https://img.qammunity.org/2021/formulas/mathematics/college/m0ramglks6yo0pm5uhlko0d3mhqwtyeeja.png)
now solve for m:
![0=2m-2-4+2m](https://img.qammunity.org/2021/formulas/mathematics/college/5s5bph48gye24f51mnvj55u8gbvm4pqith.png)
![m=(3)/(2)](https://img.qammunity.org/2021/formulas/mathematics/college/1or0v718o1b0w9ydbhagozrmyd3bnlugbw.png)
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!