# Revision history [back]

### Multiplying a vector to a list

Let's say I have a list for forms given by

U = Manifold(4, 'U')

X.<x,y,z,w> = U.chart()

f = U.diff_form(3, 'f')

f[0,1,2]=x^(2)

g=U.diff_form(3,'g')

g[0,1,2]=y^(2)

h=U.diff_form(3,'g')

h[0,1,2]=z^(3)

List=[ ]

List.append(f), List.append(g), List.append(h) So I have a list for 3 elements, each a 3 form.

Let's assume I have a list of vectors given by ListofVectors=[(0,1,1),(0,2,1), (1,2,3)].

I want to do a dot product but the problem is Sage won't let me make List into a vector so I can do like

List.dot_product(ListofVectors[i]) for i< len(ListforVectors)

Basically, I want a new list with [g+h, 2h+g, f+2g+3h]. Is there a way to dot product a list for forms with a list of vectors? Again, I think the main issue is I can't turn List into a vector for the dot product function to make sense.

### Multiplying a vector to a list

Let's say I have a list for forms given by

U = Manifold(4, 'U')'U')

X.<x,y,z,w> = U.chart()

f = U.diff_form(3, 'f')

f[0,1,2]=x^(2)

g=U.diff_form(3,'g')

g[0,1,2]=y^(2)

h=U.diff_form(3,'g')

h[0,1,2]=z^(3)

List=[ ]

List.append(f), List.append(g), List.append(h)


X.<x,y,z,w> = U.chart()

f = U.diff_form(3, 'f')

f[0,1,2]=x^(2)

g=U.diff_form(3,'g')

g[0,1,2]=y^(2)

h=U.diff_form(3,'g')

h[0,1,2]=z^(3)

List=[ ]

List.append(f), List.append(g), List.append(h) So I have a list for 3 elements, each a 3 form.

Let's assume I have a list of vectors given by ListofVectors=[(0,1,1),(0,2,1), (1,2,3)].

I want to do a dot product but the problem is Sage won't let me make List into a vector so I can do like

List.dot_product(ListofVectors[i]) for i< len(ListforVectors)len(ListforVectors)


Basically, I want a new list with [g+h, 2h+g, f+2g+3h]. Is there a way to dot product a list for forms with a list of vectors? Again, I think the main issue is I can't turn List into a vector for the dot product function to make sense. 3 None

### Multiplying a vector to a list

Let's say I have a list for of forms given by

U = Manifold(4, 'U')

X.<x,y,z,w> X.<x, y, z, w> = U.chart()
f = U.diff_form(3, 'f')

f[0,1,2]=x^(2)

g=U.diff_form(3,'g')

g[0,1,2]=y^(2)

h=U.diff_form(3,'g')

h[0,1,2]=z^(3)

List=[ f[0, 1, 2] = x^2
g = U.diff_form(3, 'g')
g[0, 1, 2] = y^2
h = U.diff_form(3, 'g')
h[0, 1, 2] = z^3
List = [ ]
List.append(f), List.append(g), List.append(h)


So I have a list for 3 elements, each a 3 form.3-form.

Let's assume I have a list of vectors given by ListofVectors=[(0,1,1),(0,2,1), (1,2,3)].

by

ListofVectors = [(0, 1, 1), (0, 2, 1), (1, 2, 3)]


I want to do a dot product but the problem is Sage won't won't let me make List List into a vector so I can do like like

List.dot_product(ListofVectors[i]) for i< i < len(ListforVectors)


Basically, I want a new list with [g+h, 2h+g, f+2g+3h]. [g + h, 2*h + g, f + 2*g + 3*h]. Is there a way to dot product a list for of forms with a list of vectors? Again, I think the main issue is I can't turn List into a vector for the dot product function to make sense. 4 None

### Multiplying a vector to a list

Let's say I have a list of forms given by

U = Manifold(4, 'U')
X.<x, y, z, w> = U.chart()
f = U.diff_form(3, 'f')
f[0, 1, 2] = x^2
g = U.diff_form(3, 'g')
g[0, 1, 2] = y^2
h = U.diff_form(3, 'g')
h[0, 1, 2] = z^3
List = [ ]
List.append(f), List.append(g), List.append(h)
[f, g, h]


So I have a list for of 3 elements, each a 3-form.

Let's assume I have a list of vectors given by

ListofVectors = [(0, 1, 1), (0, 2, 1), (1, 2, 3)]


I want to do a dot product but the problem is Sage won't let me make List into a vector so I can do like

List.dot_product(ListofVectors[i]) for i < len(ListforVectors)


Basically, I want a new list with [g + h, 2*h + g, f + 2*g + 3*h]. Is there a way to dot product a list of forms with a list of vectors? Again, I think the main issue is I can't turn List into a vector for the dot product function to make sense.