You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: concepts/complex-numbers/about.md
+13-1
Original file line number
Diff line number
Diff line change
@@ -193,7 +193,11 @@ So a simple expression with three of the most important constants in nature `e`,
193
193
Some people believe this is the most beautiful result in all of mathematics.
194
194
It dates back to around 1740.
195
195
196
-
The polar `(r, θ)` notation is so useful, that there are built-in functions `cis` (short for cos(x) + isin(x)) and `cispi` (short for cos(πx) + isin(πx)) which can help in constructing it more efficiently.
196
+
The polar `(r, θ)` notation is so useful, that there are built-in functions `cis` (short for `cos(x) + isin(x)`) and `cispi` (short for `cos(πx) + isin(πx)`) which can help in constructing it more efficiently.
197
+
198
+
The usefulness of polar notation is found in Euler's elegant formula, `ℯ^(iθ) = cos(θ) + isin(θ) = x + iy`, where `|x + iy| = 1`.
199
+
With `|x + iy| = r`, we have the more general polar form of `r * ℯ^(iθ) = r * (cos(θ) + isin(θ)) = x + iy`.
200
+
Note that the exponential form, in particular, is compact and easy to manipulate.
Incidentally, this makes complex numbers very useful for performing rotations and radial displacements in 2D.
228
+
229
+
For rotations, the complex number `z = x + iy`, can be rotated an angle `θ` about the origin with a simple multiplication: `z * ℯ^(iθ)`.
230
+
Note that the `x` and `y` here are just the usual coordinates on the real 2D Cartesian plane, and a positive angle results in a *counterclockwise* rotation, while a negative angle results in a *clockwise* one.
231
+
232
+
Likewise simply, a radial displacement `Δr` can be made by adding it to the magnitude `r` of a complex number in the polar form (eg. `z = r * ℯ^(iθ)` -> `z' = (r + Δr) * ℯ^(iθ)`).
233
+
Note how the angular part stays the same and only the magnitude, `r`, is varied, as expected.
The polar `(r, θ)` notation is so useful, that there are built-in functions `cis` (short for cos(x) + isin(x)) and `cispi` (short for cos(πx) + isin(πx)) which can help in constructing it more efficiently.
162
+
The polar `(r, θ)` notation is so useful, that there are built-in functions `cis` (short for `cos(x) + isin(x)`) and `cispi` (short for `cos(πx) + isin(πx)`) which can help in constructing it more efficiently.
163
+
164
+
The usefulness of polar notation is found in Euler's elegant formula, `ℯ^(iθ) = cos(θ) + isin(θ) = x + iy`, where `|x + iy| = 1`.
165
+
With `|x + iy| = r`, we have the more general polar form of `r * ℯ^(iθ) = r * (cos(θ) + isin(θ)) = x + iy`.
166
+
Note that the exponential form, in particular, is compact and easy to manipulate.
163
167
164
168
```julia-repl
165
169
julia> exp(1im * π) ≈ cis(π) ≈ cispi(1)
@@ -185,3 +189,11 @@ julia> cis(θ)
185
189
julia> cispi(θ / π) # θ/π == 1/2
186
190
0.0 + 1.0im
187
191
```
192
+
193
+
Incidentally, this makes complex numbers very useful for performing rotations and radial displacements in 2D.
194
+
195
+
For rotations, the complex number `z = x + iy`, can be rotated an angle `θ` about the origin with a simple multiplication: `z * ℯ^(iθ)`.
196
+
Note that the `x` and `y` here are just the usual coordinates on the real 2D Cartesian plane, and a positive angle results in a *counterclockwise* rotation, while a negative angle results in a *clockwise* one.
197
+
198
+
Likewise simply, a radial displacement `Δr` can be made by adding it to the magnitude `r` of a complex number in the polar form (eg. `z = r * ℯ^(iθ)` -> `z' = (r + Δr) * ℯ^(iθ)`).
199
+
Note how the angular part stays the same and only the magnitude, `r`, is varied, as expected.
0 commit comments