Skip to content

Commit

Permalink
Changing description for complex-numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
jagdish-15 committed Nov 17, 2024
1 parent 32d3e3d commit e1e9bff
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions exercises/complex-numbers/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,21 @@ A **complex number** is expressed in the form `z = a + b * i`, where:

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

```plaintext
```text
z̅ = a - b * i
```

### Absolute Value

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

```plaintext
```text
|z| = sqrt(a^2 + b^2)
```

### Sqaure

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

```plaintext
```text
|z|² = z * z̅ = a² + b²
```

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

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:

```plaintext
```text
z₁ + z₂ = (a + c) + (b + d) * i
```

### Subtraction

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

```plaintext
```text
z₁ - z₂ = (a - c) + (b - d) * i
```

### Multiplication

The product of two complex numbers is defined as:

```plaintext
```text
z₁ * z₂ = (a + b * i) * (c + d * i) = (a * c - b * d) + (b * c + a * d) * i
```

### Reciprocal

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

```plaintext
```text
1 / z = 1 / (a + b * i) = a / (a² + b²) - b / (a² + b²) * i
```

### Division

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

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

### Exponentiation

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

```plaintext
```text
e^(a + b * i) = e^a * e^(b * i) = e^a * (cos(b) + i * sin(b))
```

Expand Down

0 comments on commit e1e9bff

Please sign in to comment.