"File: GRAM" "###################################" "AUXILIARY FUNCTIONS" U_(z):=z/ABS(z) D_(x):=DIMENSION(x) E_(z,i):=ELEMENT(z,i) HELP_G(z,w,k):=VECTOR(IF(iD_(w),z,GRAM_H(HELP_G(z,w,k),w,k+1)) "########################################" "USER FUNCITONS" GRAM(w):=GRAM_H([U_(E_(w,1))],w,2) "#################################################" "INSTRUCTIONS" "If w is a matrix whose rows are independant" "then GRAM(w) returns a matrix whose rows are an orthonormal basis" "for the space spanned by the rows of w." "########################################" "EXAMPLE" a:=[[2,4,1,0,0],[2,3,4,3,6],[4,2,3,1,1]] "Simplify the following to see Gram-Schmidt applied to a" GRAM(a)