Question: How to get the first row when vector are like matrix


g1 := Vector([0, y, x]);

g2 := Vector([0, y^2-x-y, 0]);

g3 := Vector([x, x+y, 0]);

g4 := Vector([y, -y, 0]);

g5 := Vector([0, x*y+x/2+y/2, 0]);

g6 := Vector([0, x^2-x/4-y/4, 0]);


[g1, g2, g3, g4, g5, g6]


cc := [Vector(3, {(1) = 0, (2) = y, (3) = x}), Vector(3, {(1) = 0, (2) = y^2-x-y, (3) = 0}), Vector(3, {(1) = x, (2) = x+y, (3) = 0}), Vector(3, {(1) = y, (2) = -y, (3) = 0}), Vector(3, {(1) = 0, (2) = x*y+(1/2)*x+(1/2)*y, (3) = 0}), Vector(3, {(1) = 0, (2) = x^2-(1/4)*x-(1/4)*y, (3) = 0})]


How to get the first row of cc

output should be [0, 0, x, y, 0, 0]

second row  should be [y, y^2-x-y, x+y, -y, x*y+(1/2)*x+(1/2)*y, x^2-(1/4)*x-(1/4)*y]

Please Wait...