Re: [sage-support] how do I do this exercise that asks me given a bilinear form and a subspace determine the root base of the bilinear form restricted to the subspace

2021-07-08 Thread David Joyner
def es(b,W): : m=dimension(span(A)) : n=W.dimension() : B=W.basis() : if transpose(A)!=A: : print("La matrice deve essere simmetrica") : return : else: : componenti=[var('x'+str(i)) for i in range(1,m+1)] :

[sage-support] how do I do this exercise that asks me given a bilinear form and a subspace determine the root base of the bilinear form restricted to the subspace

2021-07-08 Thread Cosimo Romito
sage: def es(b,W): m=dimension(span(A)) n=W.dimension() B=W.basis() if transpose(A)<>A: print("La matrice deve essere simmetrica") return else: componenti=[var('x'+str(i)) for i in range(1,m+1)] w=(SR^m).linear_combination_of_basis(componenti)