Difference between revisions of "Cross Command"

From GeoGebra Manual
Jump to: navigation, search
(command syntax: changed [ ] into ( ))
 
(10 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<noinclude>{{Manual Page|version=4.0}}</noinclude>{{betamanual|version=4.2}}
+
<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 [[w:Cross_product|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>}}
:{{example| 1=<div><code><nowiki>Cross[{1, 3, 2}, {0, 3, -2}]</nowiki></code> yields ''{-12, 2, 3}''.</div>}}
+
:For 2D vectors or points the result is the z-coordinate of the actual cross product.
:If a vector contains undefined variables, it yields a formula for the cross product.
+
:{{example|<code><nowiki>Cross((1,2),(4,5))</nowiki></code> yields -3.}}
:{{example|1=<div><code><nowiki>Cross[{a, b, c}, {d, e, f}]</nowiki></code> yields ''{b f - c e, -a f + c d, a e - b d}''.</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.
{{note| 1=<div>
+
<code><nowiki>Cross((a, b, c), (d, e, f))</nowiki></code> yields ''(b f - c e, -a f + c d, a e - b d)''.
* In the [[Input Bar]] you can use <code>u ⊗ v</code>.
+
}}
* See also [[Dot Command]].
+
{{notes| 1=
</div>}}
+
* 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 11: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