Skip to content

Commit 80a5fad

Browse files
committed
Chnaging description of Complex-Number after suggestions
1 parent 5d6fc06 commit 80a5fad

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

exercises/complex-numbers/description.md

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ A **complex number** is expressed in the form `z = a + b * i`, where:
1414

1515
The conjugate of the complex number `z = a + b * i` is given by:
1616

17-
```math
17+
```plaintext
1818
z̅ = a - b * i
1919
```
2020

2121
### Absolute Value
2222

2323
The absolute value (or modulus) of `z` is defined as:
2424

25-
```math
25+
```plaintext
2626
|z| = sqrt(a^2 + b^2)
2727
```
2828

2929
The square of the absolute value, `|z|²`, can be computed as the product of `z` and its conjugate:
3030

31-
```math
31+
```plaintext
3232
|z|² = z * z̅ = a² + b²
3333
```
3434

@@ -38,47 +38,39 @@ The square of the absolute value, `|z|²`, can be computed as the product of `z`
3838

3939
The sum of two complex numbers `z₁ = a + b * i` and `z₂ = c + d * i` is computed by adding their real and imaginary parts separately:
4040

41-
```math
41+
```plaintext
4242
z₁ + z₂ = (a + c) + (b + d) * i
4343
```
4444

4545
### Subtraction
4646

4747
The difference of two complex numbers is obtained by subtracting their respective parts:
4848

49-
```math
49+
```plaintext
5050
z₁ - z₂ = (a - c) + (b - d) * i
5151
```
5252

5353
### Multiplication
5454

5555
The product of two complex numbers is defined as:
5656

57-
```math
57+
```plaintext
5858
z₁ * z₂ = (a + b * i) * (c + d * i) = (a * c - b * d) + (b * c + a * d) * i
5959
```
6060

6161
### Division
6262

6363
The division of one complex number by another is given by:
6464

65-
```math
65+
```plaintext
6666
z₁ / z₂ = (a + b * i) / (c + d * i) = (a * c + b * d) / (c² + d²) + (b * c - a * d) / (c² + d²) * i
6767
```
6868

69-
### Reciprocal
70-
71-
The reciprocal of a non-zero complex number is given by:
72-
73-
```math
74-
1 / z = 1 / (a + b * i) = a / (a² + b²) - b / (a² + b²) * i
75-
```
76-
7769
### Exponentiation
7870

7971
Raising _e_ (the base of the natural logarithm) to a complex exponent can be expressed using Euler's formula:
8072

81-
```math
73+
```plaintext
8274
e^(a + b * i) = e^a * e^(b * i) = e^a * (cos(b) + i * sin(b))
8375
```
8476

0 commit comments

Comments
 (0)