Difference between revisions of "Complex Numbers"
(added v.4 - fixed interlink) |
|||
Line 1: | Line 1: | ||
− | <noinclude>{{Manual Page}}[[Category:Manual (official)|{{PAGENAME}}]]</noinclude> | + | <noinclude>{{Manual Page|version=4.0}}[[Category:Manual (official)|{{PAGENAME}}]]</noinclude> |
{{objects|general}} | {{objects|general}} | ||
Line 17: | Line 17: | ||
{{Note|The usual multiplication (2, 1)*(1, -2) gives you the scalar product of the two vectors.}} | {{Note|The usual multiplication (2, 1)*(1, -2) gives you the scalar product of the two vectors.}} | ||
− | GeoGebra also recognizes expressions involving [[Numbers and Angles|real] and complex numbers. | + | GeoGebra also recognizes expressions involving [[Numbers and Angles|real]] and complex numbers. |
{{example| | {{example| | ||
* 3 + (4 + 5i) gives you the complex number 7 + 5i. | * 3 + (4 + 5i) gives you the complex number 7 + 5i. |
Revision as of 12:08, 16 February 2011
GeoGebra does not support complex numbers directly, but you may use points or vectors to simulate operations with complex numbers.
If the variable i has not already been defined, it is recognized as the ordered pair i = (0, 1) or the complex number 0 + 1i. This also means, that you can use this variable i in order to type complex numbers into the Input Bar (e. g., q = 3 + 4i).
- (2 + 1i) + (1 – 2i) gives you the complex number 3 – 1i.
- (2 + 1i) - (1 – 2i) gives you the complex number 1 + 3i.
- (2 + 1i) * (1 – 2i) gives you the complex number 4 – 3i.
- (2 + 1i) / (1 – 2i) gives you the complex number 0 + 1i.
GeoGebra also recognizes expressions involving real and complex numbers.
- 3 + (4 + 5i) gives you the complex number 7 + 5i.
- 3 - (4 + 5i) gives you the complex number -1 - 5i.
- 3 / (0 + 1i) gives you the complex number 0 - 3i.
- 3 * (1 + 2i) gives you the complex number 3 + 6i.
Comments
Workaround: IsComplex[][edit]
Sometimes you may want to check if a number is treated as complex number in GeoGebra, as function such as x()
and y()
do not work with real numbers. As there is no such command as IsComplex
you currently have to employ a small trick to check if the number a
is complex: complex = IsDefined[sqrt(a) + sqrt(-a)] ∧ (a ≠ 0)
.
a = 2 + 0i
, also pass this test. If you just want to check if the imaginary part of a complex number a
is not 0 you can use y(a) != 0
.