# Nakafa Framework: LLM

URL: /en/subject/high-school/11/mathematics/complex-number/addition-complex-numbers
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/subject/high-school/11/mathematics/complex-number/addition-complex-numbers/en.mdx

Output docs content for large language models.

---

import { LineEquation } from "@repo/design-system/components/contents/line-equation";
import { getColor } from "@repo/design-system/lib/color";

export const metadata = {
  title: "Addition of Complex Numbers",
  description: "Learn how to add complex numbers step-by-step with geometric visualization. Master real and imaginary parts addition using parallelogram rule and examples.",
  authors: [{ name: "Nabil Akbarazzima Fatih" }],
  date: "05/01/2025",
  subject: "Complex Number",
};

## Addition of Two Complex Numbers

How do you add two complex numbers?

Suppose we have two complex numbers:

<div className="flex flex-col gap-4">
  <BlockMath math="z_1 = x_1 + iy_1" />
  <BlockMath math="z_2 = x_2 + iy_2" />
</div>

To add them (<InlineMath math="z_1 + z_2" />), simply add the real parts together and the imaginary parts together.

<BlockMath math="z_1 + z_2 = (x_1 + x_2) + i(y_1 + y_2)" />

### Addition Example

Let <InlineMath math="z_1 = 2 + 3i" /> and <InlineMath math="z_2 = 1 - i" />.

- The real part of <InlineMath math="z_1" /> is 2, the real part of <InlineMath math="z_2" /> is 1.
- The imaginary part of <InlineMath math="z_1" /> is 3, the imaginary part of <InlineMath math="z_2" /> is -1.

Then their sum is:

<BlockMath math="z_1 + z_2 = (2 + 1) + i(3 + (-1)) = 3 + i(2) = 3 + 2i" />

### Visualization of Addition

Using the parallelogram rule, the addition of complex numbers can be viewed geometrically on the complex plane. If we represent <InlineMath math="z_1" /> and <InlineMath math="z_2" /> as vectors (arrows) from the origin (0,0), then their sum, <InlineMath math="z_1 + z_2" />, is the diagonal vector of the parallelogram formed by <InlineMath math="z_1" /> and <InlineMath math="z_2" />.

<LineEquation
  title="Geometric Addition of Complex Numbers"
  description={
    <>
      Visualization of the sum <InlineMath math="z_1 = 2+3i" /> and{" "}
      <InlineMath math="z_2 = 1-i" /> using the parallelogram rule.
    </>
  }
  cameraPosition={[0, 0, 12]}
  showZAxis={false}
  data={[
    // Vector z1
    {
      points: [
        { x: 0, y: 0, z: 0 },
        { x: 2, y: 3, z: 0 },
      ],
      color: getColor("SKY"),
      labels: [{ text: "z₁ = 2 + 3i", at: 1, offset: [0.5, 0.5, 0] }],
      cone: { position: "end" },
    },
    // Vector z2
    {
      points: [
        { x: 0, y: 0, z: 0 },
        { x: 1, y: -1, z: 0 },
      ],
      color: getColor("EMERALD"),
      labels: [{ text: "z₂ = 1 - i", at: 1, offset: [0.5, -0.5, 0] }],
      cone: { position: "end" },
    },
    // Resultant vector z1 + z2
    {
      points: [
        { x: 0, y: 0, z: 0 },
        { x: 3, y: 2, z: 0 },
      ],
      color: getColor("ROSE"),
      labels: [{ text: "z₁ + z₂ = 3 + 2i", at: 1, offset: [2, -1, 0] }],
      cone: { position: "end" },
    },
    // Parallelogram helper line (from end of z1 to end of z1+z2)
    {
      points: [
        { x: 2, y: 3, z: 0 },
        { x: 3, y: 2, z: 0 },
      ],
      color: getColor("EMERALD"),
    },
    // Parallelogram helper line (from end of z2 to end of z1+z2)
    {
      points: [
        { x: 1, y: -1, z: 0 },
        { x: 3, y: 2, z: 0 },
      ],
      color: getColor("SKY"),
    },
  ]}
/>

## Related Operations

Besides addition, other operations work similarly:

### Scalar Multiplication

Multiplying a complex number <InlineMath math="z = x + iy" /> by a real number (scalar) <InlineMath math="c" /> is straightforward. Just multiply <InlineMath math="c" /> into both the real and imaginary parts.

<BlockMath math="cz = c(x + iy) = cx + i(cy)" />

Geometrically, this scales the vector <InlineMath math="z" /> by a factor of <InlineMath math="c" />. If <InlineMath math="c" /> is negative, the vector's direction is reversed.

### Negative of a Complex Number

The negative of <InlineMath math="z = x + iy" /> is <InlineMath math="-z" />. This is the same as scalar multiplication by <InlineMath math="c = -1" />.

<BlockMath math="-z = -(x + iy) = -x + i(-y) = -x - iy" />

Geometrically, <InlineMath math="-z" /> is a vector with the same length as <InlineMath math="z" /> but pointing in the opposite direction (180 degrees rotation).

### Subtraction of Two Complex Numbers

Subtracting <InlineMath math="z_2" /> from <InlineMath math="z_1" /> (<InlineMath math="z_1 - z_2" />) is the same as adding <InlineMath math="z_1" /> to the negative of <InlineMath math="z_2" /> (<InlineMath math="z_1 + (-z_2)" />).

<BlockMath math="z_1 - z_2 = z_1 + (-z_2) = (x_1 + (-x_2)) + i(y_1 + (-y_2)) = (x_1 - x_2) + i(y_1 - y_2)" />

So, subtract the real parts and subtract the imaginary parts.

Geometrically, <InlineMath math="z_1 - z_2" /> is the vector from the tip of <InlineMath math="z_2" /> to the tip of <InlineMath math="z_1" />.

### Example of Combined Operations

Suppose we have:

<div className="flex flex-col gap-4">
  <BlockMath math="z_1 = 2 + \frac{1}{2}i" />
  <BlockMath math="z_2 = -3 + \sqrt{2}i" />
</div>

Let's calculate some operations:

1.  **<InlineMath math="2z_1" /> (Scalar Multiplication):**

    <BlockMath math="2z_1 = 2(2 + \frac{1}{2}i) = 2(2) + i(2 \times \frac{1}{2}) = 4 + i" />

2.  **<InlineMath math="z_1 + 3z_2" /> (Addition and Scalar Multiplication):**

    <div className="flex flex-col gap-4">
      <BlockMath math="z_1 + 3z_2 = (2 + \frac{1}{2}i) + 3(-3 + \sqrt{2}i)" />
      <BlockMath math="= (2 + \frac{1}{2}i) + (3(-3) + i(3\sqrt{2}))" />
      <BlockMath math="= (2 + \frac{1}{2}i) + (-9 + 3\sqrt{2}i)" />
      <BlockMath math="= (2 - 9) + i(\frac{1}{2} + 3\sqrt{2})" />
      <BlockMath math="= -7 + i(\frac{1}{2} + 3\sqrt{2})" />
    </div>

3.  **<InlineMath math="2z_1 - z_2" /> (Subtraction and Scalar Multiplication):**
    <div className="flex flex-col gap-4">
      <BlockMath math="2z_1 - z_2 = (4 + i) - (-3 + \sqrt{2}i)" />
      <BlockMath math="= (4 - (-3)) + i(1 - \sqrt{2})" />
      <BlockMath math="= (4 + 3) + i(1 - \sqrt{2})" />
      <BlockMath math="= 7 + i(1 - \sqrt{2})" />
    </div>

## Exercise

If <InlineMath math="z_1 = 1 + 2i" /> and <InlineMath math="z_2 = 3 - i" />. Determine:

1.  <InlineMath math="z_1 + z_2" />
2.  <InlineMath math="z_1 - z_2" />
3.  If <InlineMath math="z_3 = z_1 + z_2" />, draw <InlineMath math="z_1" />, <InlineMath math="z_2" />, and <InlineMath math="z_3" /> on the complex plane.

### Answer Key

1.  <InlineMath math="z_1 + z_2 = (1+3) + i(2+(-1)) = 4 + i" />
2.  <InlineMath math="z_1 - z_2 = (1-3) + i(2-(-1)) = -2 + i(3) = -2 + 3i" />
3.  Visualization of <InlineMath math="z_1" />, <InlineMath math="z_2" />, and <InlineMath math="z_3 = z_1 + z_2" /> on the complex plane using the parallelogram rule:

    <LineEquation
      title="Addition of Complex Numbers"
      description={
        <>
          Visualization of <InlineMath math="z_1" />, <InlineMath math="z_2" />,
          and <InlineMath math="z_3 = z_1 + z_2" /> on the complex plane using
          the parallelogram rule.
        </>
      }
      cameraPosition={[0, 0, 12]}
      showZAxis={false}
      data={[
        {
          points: [
            { x: 0, y: 0, z: 0 },
            { x: 1, y: 2, z: 0 },
          ],
          color: getColor("SKY"),
          labels: [{ text: "z₁ = 1 + 2i", at: 1, offset: [0.5, 0.5, 0] }],
          cone: { position: "end" },
        },
        {
          points: [
            { x: 0, y: 0, z: 0 },
            { x: 3, y: -1, z: 0 },
          ],
          color: getColor("EMERALD"),
          labels: [{ text: "z₂ = 3 - i", at: 1, offset: [0.5, -0.5, 0] }],
          cone: { position: "end" },
        },
        {
          points: [
            { x: 0, y: 0, z: 0 },
            { x: 4, y: 1, z: 0 }, // z3 = z1 + z2
          ],
          color: getColor("ROSE"),
          labels: [{ text: "z₃ = 4 + i", at: 1, offset: [0.5, 0.5, 0] }],
          cone: { position: "end" },
        },
        // Parallelogram helper lines
        {
          points: [
            { x: 1, y: 2, z: 0 }, // end of z1
            { x: 4, y: 1, z: 0 }, // end of z3
          ],
          color: getColor("EMERALD"),
        },
        {
          points: [
            { x: 3, y: -1, z: 0 }, // end of z2
            { x: 4, y: 1, z: 0 }, // end of z3
          ],
          color: getColor("SKY"),
        },
      ]}
    />
