mirror of
https://github.com/trekhleb/javascript-algorithms.git
synced 2025-07-06 09:23:18 +08:00
Add polar form of complex number to README.
This commit is contained in:
@ -39,6 +39,38 @@ a vector on a diagram called an *Argand diagram*, representing the *complex plan
|
||||
imaginary, together form a complex, just like a building complex (buildings
|
||||
joined together).
|
||||
|
||||
## Polar Form
|
||||
|
||||
An alternative way of defining a point `P` in the complex plane, other than using
|
||||
the x- and y-coordinates, is to use the distance of the point from `O`, the point
|
||||
whose coordinates are `(0, 0)` (the origin), together with the angle subtended
|
||||
between the positive real axis and the line segment `OP` in a counterclockwise
|
||||
direction. This idea leads to the polar form of complex numbers.
|
||||
|
||||

|
||||
|
||||
The *absolute value* (or modulus or magnitude) of a complex number `z = x + yi` is:
|
||||
|
||||

|
||||
|
||||
The argument of `z` (in many applications referred to as the "phase") is the angle
|
||||
of the radius `OP` with the positive real axis, and is written as `arg(z)`. As
|
||||
with the modulus, the argument can be found from the rectangular form `x+yi`:
|
||||
|
||||

|
||||
|
||||
Together, `r` and `φ` give another way of representing complex numbers, the
|
||||
polar form, as the combination of modulus and argument fully specify the
|
||||
position of a point on the plane. Recovering the original rectangular
|
||||
co-ordinates from the polar form is done by the formula called trigonometric
|
||||
form:
|
||||
|
||||

|
||||
|
||||
Using Euler's formula this can be written as:
|
||||
|
||||

|
||||
|
||||
## Basic Operations
|
||||
|
||||
### Adding
|
||||
|
Reference in New Issue
Block a user