Vector as matrix

Wouter De Keersmaecker shared this question 3 years ago
Answered

Given vectors u and v, I want to calculate the matrix u * Transpose(v).

However, it seems Geogebra doesn't accept vectors as an argument to Transpose.

How can I convert a vector to a matrix, or calculate the above formula?

Best Answer
photo

Given a vector u= (1, 2) you can define a matrix um={x(u),y(u)}.

With m1={{1,2},{3,4}} now u * m1 will work and produce m2 = {{1, 2}, {6, 8}} showing in the Algebra as a normal vector.

chris

Comments (5)

photo
2

Given a vector u= (1, 2) you can define a matrix um={x(u),y(u)}.

With m1={{1,2},{3,4}} now u * m1 will work and produce m2 = {{1, 2}, {6, 8}} showing in the Algebra as a normal vector.

chris

photo
1

Jep, that is exactly what I need. Thank you!


Would be nice if Geogebra had a built-in function for this though, similar to how you can convert a point to a vector simply by calling Vector(point).

photo
1

Well, that's not exactly the same. Vector(point) creates the vector between two points of which the first one is the origin. This command is created because it's a frequently used command, the same as the command Rotate(object, angle) is created because rotation around the origin is very common. So Vector(point) as such is not a conversion but the simpliest and frequently used choice of parameters, while Matrix(point) or Matrix(vector) would be a new command.

photo
1

I have not problem with u m1 nor m1 u

um={x(u),y(u)} is not useful

photo
1

@mathmagic indeed you can calculate u m1 and m1 u but this produces a point (7,10) where Wouter wanted the vector to behave as a matrix, to produce a 'normal' matrix product.

© 2023 International GeoGebra Institute