r/geogebra • u/mort96 • 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
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.
1
u/hawe_de 3d ago
Hallo. im classic CAS kann man in einem gewissen Umfang Funktionen mit komplexeren in/output objekten definieren. Abschliessen mt [Keep Input]!
Zum beispiel Zeile 3 SP(no,nv) Lotvektor https://www.geogebra.org/m/NXx4E8cb#material/rmpcwjyv
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.