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

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
'''
```

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?See https://ask.sagemath.org/question/60878