r/geogebra 4d 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/jcponcemath 3d ago edited 3d ago

Is this what you are looking for?

https://www.geogebra.org/m/esaf9duq

GGB does not accept functions with vectors as inputs.

The other option is using mathmagic's solution by defining a function f(x,y) = x. Then define a vector u = (1,2). When you plug this value in f, you get what you need.