gram_schmidt orthogonalization process over GF(p) ? [closed]

asked 2023-04-04 15:02:34 +0100

aliosman9522 gravatar image

updated 2023-04-04 15:21:12 +0100

Let B be a basis of the inner product space V defined on GF(p), and B' be the orthogonal set of B. My goal is to find B' for a given B.

I use the following #fnc to get n linear independent vectors over GF(p);

def gen_basis(p,d):
    V=VectorSpace(GF(p),d)
    B=[]
    while True:
        t=V.random_element()
        if not V.linear_dependence(B + [t]):
            B.append(t)
        if len(B)==d:break
    return B
B=gen_basis(11,3)

#case 1:
m=Matrix(GF(11),b)
print(m)
            [ 7  1  7]
            [ 5  1  9]
            [ 1  7 10]
G,M=m.gram_schmidt() #i get the error as follow
#AttributeError:'sage.rings.finite_rings.integer_mod.IntegerMod_int' object has no attribute 'conjugate' 

#case 2: If i use;
from sage.modules.misc import gram_schmidt 
G,M=gram_schmidt(b)
 '''               
In  this case orthogonalization works, but in some cases ;
B'={w1,w2,....wk}
<wi,w_>= 0 for some i values, what could be the reason for this?
What does it mean <w_i,w_i> is zero
'''
edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by Max Alekseyev
close date 2023-04-08 18:26:59.921671

Comments

Suppose p=2 and n=3 and the basis B consists of (1,1,0), (1,0,1), and (0,1,1). What should the Gram-Schmidt process do in this case?

John Palmieri gravatar imageJohn Palmieri ( 2023-04-04 20:14:51 +0100 )edit