Difference between revisions of "Cross Command"

From GeoGebra Manual
Jump to: navigation, search
(command syntax: changed [ ] into ( ))
 
(19 intermediate revisions by 8 users not shown)
Line 1: Line 1:
<noinclude>{{Manual Page|version=4.0}}</noinclude>
+
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|cas=true|vector-matrix}}
{{command|CAS}}
+
;Cross( <Vector u> , <Vector v> )
;Cross[ <Vector u> , <Vector v> ]
+
:Calculates the [[w:Cross_product|cross product]] of ''u'' and ''v''. Instead of vectors you can also use lists.
:Calculates the cross product of ''u'' and ''v''.
+
:{{example| 1=<div><code><nowiki>Cross((1, 3, 2), (0, 3, -2))</nowiki></code> yields ''(-12, 2, 3)'', <code><nowiki>Cross({1, 3, 2}, {0, 3, -2})</nowiki></code> yields ''{-12, 2, 3}''</div>}}
:For vectors ''u=(a,b)'' and ''v=(c,d)'' returns ''ad-bc'' (i.e. the z-coordinate of vector product of ''(a,b,0), (c,d,0)'').
+
:For 2D vectors or points the result is the z-coordinate of the actual cross product.
:{{example| 1=<div><code><nowiki>Cross[{1, 3, 2}, {0, 3, -2}]</nowiki></code> gives ''{-12, 2, 3}'', the cross product of ''{1, 2, 3}'' and ''{0, 3, -2}''.</div>}}
+
:{{example|<code><nowiki>Cross((1,2),(4,5))</nowiki></code> yields -3.}}
{{note| 1=<div>
+
{{hint|1=If a vector in the [[File:Menu view cas.svg|link=|16px]] [[CAS View]] contains undefined variables, the command yields a formula for the cross product, e.g.
*In the [[Input Bar]] you can also use <code>u⊗v</code>.
+
<code><nowiki>Cross((a, b, c), (d, e, f))</nowiki></code> yields ''(b f - c e, -a f + c d, a e - b d)''.
*See also [[Dot Command]].
+
}}
</div>}}
+
{{notes| 1=
 +
* You can also use the [[Predefined_Functions_and_Operators|operator]] <code><nowiki>u ⊗ v</nowiki></code><div>
 +
* See also [[Dot Command]].</div>}}

Latest revision as of 12:40, 5 October 2017


Cross( <Vector u> , <Vector v> )
Calculates the cross product of u and v. Instead of vectors you can also use lists.
Example:
Cross((1, 3, 2), (0, 3, -2)) yields (-12, 2, 3), Cross({1, 3, 2}, {0, 3, -2}) yields {-12, 2, 3}
For 2D vectors or points the result is the z-coordinate of the actual cross product.
Example: Cross((1,2),(4,5)) yields -3.
Note Hint: If a vector in the Menu view cas.svg CAS View contains undefined variables, the command yields a formula for the cross product, e.g. Cross((a, b, c), (d, e, f)) yields (b f - c e, -a f + c d, a e - b d).
Notes:
© 2024 International GeoGebra Institute