Difference between revisions of "Cross Command"
From GeoGebra Manual
m |
(command syntax: changed [ ] into ( )) |
||
(22 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
− | <noinclude>{{Manual Page|version= | + | <noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|cas=true|vector-matrix}} |
− | {{command| | + | ;Cross( <Vector u> , <Vector v> ) |
− | ;Cross | + | :Calculates the [[w:Cross_product|cross product]] of ''u'' and ''v''. Instead of vectors you can also use lists. |
− | : | + | :{{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 2D vectors or points the result is the z-coordinate of the actual cross product. | |
− | {{ | + | :{{example|<code><nowiki>Cross((1,2),(4,5))</nowiki></code> yields -3.}} |
+ | {{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. | ||
+ | <code><nowiki>Cross((a, b, c), (d, e, f))</nowiki></code> yields ''(b f - c e, -a f + c d, a e - b d)''. | ||
+ | }} | ||
+ | {{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.
Hint: If a vector in the 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:
- You can also use the operator
u ⊗ v
- See also Dot Command.