As usual start Maple and load all the linear algebra progams. You can plot points using this command: > plot([[-1,5],[2,4],[3,-1]],style=point, symbolsize=30,colour=blue); The matrix for the exact for quadratic for this system of equations is > E2:=<<1,4,9>|<-1,2,3>|<1,1,1>|<5,4,-1>>; Find the solutions to this system of equations to get the coefficients of a quadratic polynomial which you can define as > y:= x -> something * x^2 + something *x + something You can then plot this polynomial using: > plot(y(x),x=-1..3); Note that the curve passes through all three points. Check this using: > y(-1); > y(2); > y(3); Repeat with polynomials of degree 3 through these points: [-1,3], [-2,6], [4,-12] the system of equations in this cases is: > E3:=<<-1,-8,64>|<1,4,16>|<-1,-2,4>|<1,1,1>|<3,6,-12>>; Solve for a*x^3+b*x^2 + c*x +d using > LinearSolve(E3,free=t); to see that a=-t, b=t, c=10*t -3, d=8t. You can plot the family of polynomials of degree 3 like this: > with(plots); > p3j:=(-t*x^3 + t*x^2+ (10*t-3)*x + 8*t); > animate( plot, [p3j,x=-3..5], t=-5..5, trace=4, frames=50 ); To animate the plot you click on the image and then press the "play" button that is now in the toolbar at the top. Note how every cubic curve passes through all 3 specified points.When t=0 the cubic curve is actually a straight line. Pick 5 random points and create the system of equations for a straight line through them as follows: > xv:=RandomVector(5,generator=-4..4); > F:=< xv | <1,1,1,1,1>>; > yv:=RandomVector(5,generator=0..7); Use this command to plot your points: > plot((xv,yv),style=point, symbolsize=30,colour=red); We can now create the best fit straight line as follows: > FTF:=Multiply(Transpose(F),F); > FTy:=Multiply(Transpose(F),yv); Find the solution to FTF times v = FTy, which is the best fit line, by using RREF, inverses or by using LinearSolve. Find the differences between the polynomial and the data points. Now repeat with the same xv and yv to plot the best fit quadratic to your data and check the differences. Verify that the sum of the squares of the differences of the quadratic are smaller than the sum of the squares of the differences of the line. Pick two random lines in 2 dimensional space of the form mx+b, plot them together and see where they intersect. Convert the lines into vector form and solve the matrix equation to find the coordinates of the point of intersection. Use Gram-Schmidt on a random vector v4 with the vectors from class to get e4 in the ratio predicted > e1:=<1,3,3,-2>;e2:=<1,0,1,2>;e3:=<-6,4,0,3>; > e4:= v4 - Multiply(Transpose(v4),e1)/Multiply(Transpose(e1),e1)*e1- Multiply(Transpose(v4),e2)/Multiply(Transpose(e2),e2)*e2- Multiply(Transpose(v4),e3)/Multiply(Transpose(e3),e3)*e3; Pick two 4 random dimensional vectors u1 and u2 and apply the Gram-Schmidt method on them to make an orthogonal basis. Check that the dot product of e1 and e2 is 0 using: > Multiply(Transpose(e1),e2); Now add a third random vector v3 and find the integer form of the orthogonal basis vector with e1 and e2. Check that the dot products are all 0 as expected.