Skip to content

Commit e1e9bff

Browse files
committed
Changing description for complex-numbers
1 parent 32d3e3d commit e1e9bff

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

exercises/complex-numbers/description.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +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-
```plaintext
17+
```text
1818
z̅ = a - b * i
1919
```
2020

2121
### Absolute Value
2222

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

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

29-
### Sqaure
30-
3129
The square of the absolute value, `|z|²`, can be computed as the product of `z` and its conjugate:
3230

33-
```plaintext
31+
```text
3432
|z|² = z * z̅ = a² + b²
3533
```
3634

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

4139
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:
4240

43-
```plaintext
41+
```text
4442
z₁ + z₂ = (a + c) + (b + d) * i
4543
```
4644

4745
### Subtraction
4846

4947
The difference of two complex numbers is obtained by subtracting their respective parts:
5048

51-
```plaintext
49+
```text
5250
z₁ - z₂ = (a - c) + (b - d) * i
5351
```
5452

5553
### Multiplication
5654

5755
The product of two complex numbers is defined as:
5856

59-
```plaintext
57+
```text
6058
z₁ * z₂ = (a + b * i) * (c + d * i) = (a * c - b * d) + (b * c + a * d) * i
6159
```
6260

6361
### Reciprocal
6462

6563
The reciprocal of a non-zero complex number is given by:
6664

67-
```plaintext
65+
```text
6866
1 / z = 1 / (a + b * i) = a / (a² + b²) - b / (a² + b²) * i
6967
```
7068

7169
### Division
7270

7371
The division of one complex number by another is given by:
7472

75-
```plaintext
73+
```text
7674
z₁ / z₂ = z₁ * (1 / z₂) = (a + b * i) / (c + d * i) = (a * c + b * d) / (c² + d²) + (b * c - a * d) / (c² + d²) * i
7775
```
7876

7977
### Exponentiation
8078

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

83-
```plaintext
81+
```text
8482
e^(a + b * i) = e^a * e^(b * i) = e^a * (cos(b) + i * sin(b))
8583
```
8684

0 commit comments

Comments
 (0)