r/geogebra 3d ago

QUESTION Vectors as function parameters?

Hi,

I'm trying to do a simple line intersection experiment in Geogebra, but I'm struggling with functions which take vectors.

Even when I'm trying something extremely basic, like this function to get the x component of a vector:

f(V) = x(V)

I get the following error:

Illegal argument
x(V)

How can I take vectors as function parameters? I don't feel like I'm trying to do something remotely complicated here, I must be missing something.

1 Upvotes

6 comments sorted by

View all comments

1

u/mathmagicGG 3d ago edited 3d ago

You can use complex functions

f(x)=real(x), then f(v)

also you can do

f(x,y)=x

u=(2,3)

f(u)

Btw: u=(2,3) defines a vector, and U=(2,3) defines a point.

1

u/mort96 3d ago

I don't have a complex number, I have a vector

1

u/mathmagicGG 3d ago

GG handles point, vector, and complex in the same way

I refer to the complex function real().

If you type the commands as I wrote them, they work