kcrisman wrote: > For the second one I use .row_space().matrix().rows() and .column_space > ().matrix().rows(), or whatever is appropriate. I agree that is > cludgy. It would also be nice to have an automatic "orthogonal > complement" or "perp" function, e.g. for getting the perp of a kernel > without resorting to row/column spaces... > >
I wrote an orthogonal complement function a long time ago; I'm surprised to not be able to find it in Sage now. I thought it was merged in at least a year ago. To answer the question about intersection and adding subspaces, is this what you mean? sage: M=matrix(4,range(16)) sage: a=M.right_kernel() sage: a Free module of degree 4 and rank 2 over Integer Ring Echelon basis matrix: [ 1 0 -3 2] [ 0 1 -2 1] sage: N=matrix(4,[1,2,1,-1, 2,4,2,-2, 4,3,2,1,1,2,3,5]) sage: b=N.kernel() sage: b Free module of degree 4 and rank 1 over Integer Ring Echelon basis matrix: [ 2 -1 0 0] sage: a.intersection(b) Free module of degree 4 and rank 0 over Integer Ring Echelon basis matrix: [] sage: a+b Free module of degree 4 and rank 3 over Integer Ring Echelon basis matrix: [ 1 0 1 -1] [ 0 1 2 -2] [ 0 0 4 -3] Thanks, Jason -- You received this message because you are subscribed to the Google Groups "sage-edu" group. To post to this group, send email to sage-...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sage-edu?hl=.