Sunday, January 3, 2010

Matrices and lines

There are 2 uses of matrices when it comes to lines:

1_Test for collinear points:
so lets say we have these 3 points: (x1,y1) (x2,y2) (x3,y3)
the rule is: three points are collinear if and only if the determinant found by placing the x-coordinates in the first column, the y-cooredinates in the second column , and one's in the third (that's just because we have 3 points so we need to have a square matrix so we add a column of 1's) is equal to 0
and we ask the question:is the determinant of this matrix
x1 y1 1
x2 y2 1 equal to 0? if yes then they are collinear
x3 y3 1
2_to find the equation of a line:
we take to of these 3 points and we put them in a 3*3 matrix with the first row the 2 variables x and y and the determinant of this matrix shoud be equal to 0:
x y 1
x1 y1 1 =0
x2 y2 1
let's take a simple example:
(1,1) (2,2) (3,3)
1_determinant of :
1 1 1
2 2 1
3 3 1
is equal to :2+3+6-6-3-2=0 so they are collinear
2_the equation: determinant of
x y 1
1 1 1 =0 we get the equation :x=y wich is correct
2 2 1
so this method could be useful to find out if a big number of points are collinear
you can find other uses for matrices on this website:
http://people.richland.edu/james/lecture/m116/matrices/applications.html
Peter Dagher

1 comment:

  1. Peter,

    You indeed did a GREAT job!!!!!!! very interesting posts and very informative!!!!!!!!!

    Thanks a lot,

    Zeina

    ReplyDelete