# Nakafa Framework: LLM

URL: /en/subject/high-school/10/mathematics/vector-operations/three-dimensional-vector
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/subject/high-school/10/mathematics/vector-operations/three-dimensional-vector/en.mdx

Output docs content for large language models.

---

import { Vector3d } from "@repo/design-system/components/contents/vector-3d";
import { getColor } from "@repo/design-system/lib/color";

export const metadata = {
  title: "Three-Dimensional Vector",
  description: "Learn three-dimensional vectors with interactive visualizations. Master 3D vector operations, dot & cross products, and real-world applications.",
  authors: [{ name: "Nabil Akbarazzima Fatih" }],
  date: "04/12/2025",
  subject: "Vector and Operations",
};

## Understanding Three-Dimensional Vectors

A three-dimensional vector is a quantity that has both magnitude and direction in three-dimensional space. Unlike two-dimensional vectors that exist only on a plane (x and y axes), three-dimensional vectors exist in space with three coordinate axes (x, y, and z axes).

<Vector3d
  title="Vector in Three-Dimensional Space"
  description={
    <>
      Visualization of a vector in three-dimensional space with{" "}
      <InlineMath math="x" />, <InlineMath math="y" />, and{" "}
      <InlineMath math="z" /> components.
    </>
  }
  vectors={[
    {
      from: [0, 0, 0],
      to: [3, 4, 2],
      color: getColor("VIOLET"),
      label: "v",
    },
  ]}
  cameraPosition={[8, 6, 8]}
/>

## Representation of Three-Dimensional Vectors

### Notation of Three-Dimensional Vectors

Three-dimensional vectors can be notated in various ways:

1. Letter notation with an arrow above it: <InlineMath math="\vec{a}" /> or <InlineMath math="\overrightarrow{PQ}" />
2. Component notation: <InlineMath math="(a_x, a_y, a_z)" /> or <InlineMath math="(a_1, a_2, a_3)" />
3. Basis notation: <InlineMath math="a_x\vec{i} + a_y\vec{j} + a_z\vec{k}" />

### Components of Three-Dimensional Vectors

A vector in three-dimensional space consists of three components that represent the projection of the vector on each coordinate axis:

<BlockMath math="\vec{a} = (a_x, a_y, a_z) = a_x\vec{i} + a_y\vec{j} + a_z\vec{k}" />

where:

- <InlineMath math="a_x" /> is the vector component on the <InlineMath math="x" />
  -axis
- <InlineMath math="a_y" /> is the vector component on the <InlineMath math="y" />
  -axis
- <InlineMath math="a_z" /> is the vector component on the <InlineMath math="z" />
  -axis
- <InlineMath math="\vec{i}, \vec{j}, \vec{k}" /> are the unit vectors on the <InlineMath math="x" />
  ,
  <InlineMath math="y" />, and <InlineMath math="z" /> axes

<div className="mt-4">
  <Vector3d
    title="Components of a Three-Dimensional Vector"
    description={
      <>
        Three-dimensional vector with components on the <InlineMath math="x" />,
        <InlineMath math="y" />, and <InlineMath math="z" /> axes.
      </>
    }
    vectors={[
      {
        from: [0, 0, 0],
        to: [4, 0, 0],
        color: getColor("PURPLE"),
        label: "a_x",
      },
      {
        from: [0, 0, 0],
        to: [0, 3, 0],
        color: getColor("TEAL"),
        label: "a_y",
      },
      {
        from: [0, 0, 0],
        to: [0, 0, 2],
        color: getColor("AMBER"),
        label: "a_z",
      },
      {
        from: [0, 0, 0],
        to: [4, 3, 2],
        color: getColor("PINK"),
        label: "a",
      },
    ]}
    cameraPosition={[8, 6, 8]}
  />
</div>

## Magnitude of Three-Dimensional Vectors

The magnitude or length of a three-dimensional vector <InlineMath math="\vec{a} = (a_x, a_y, a_z)" /> is determined by the formula:

<BlockMath math="|\vec{a}| = \sqrt{a_x^2 + a_y^2 + a_z^2}" />

**Example**:

If <InlineMath math="\vec{a} = (3, 4, 5)" />, then the magnitude of vector <InlineMath math="\vec{a}" /> is:

<BlockMath math="|\vec{a}| = \sqrt{3^2 + 4^2 + 5^2} = \sqrt{9 + 16 + 25} = \sqrt{50} = 5\sqrt{2}" />

## Operations on Three-Dimensional Vectors

### Addition and Subtraction of Vectors

Addition and subtraction of three-dimensional vectors are performed by adding or subtracting the corresponding components.

If <InlineMath math="\vec{a} = (a_x, a_y, a_z)" /> and <InlineMath math="\vec{b} = (b_x, b_y, b_z)" />, then:

<div className="flex flex-col gap-4">
  <BlockMath math="\vec{a} + \vec{b} = (a_x + b_x, a_y + b_y, a_z + b_z)" />
  <BlockMath math="\vec{a} - \vec{b} = (a_x - b_x, a_y - b_y, a_z - b_z)" />
</div>

<div className="mt-4">
  <Vector3d
    title="Vector Addition in Three Dimensions"
    description={
      <>
        Visualization of adding vectors <InlineMath math="a" /> and{" "}
        <InlineMath math="b" /> to produce vector{" "}
        <InlineMath math="c = a + b" />.
      </>
    }
    vectors={[
      {
        from: [0, 0, 0],
        to: [2, 3, 1],
        color: getColor("TEAL"),
        label: "a",
        labelPosition: "middle",
      },
      {
        from: [2, 3, 1],
        to: [5, 4, 3],
        color: getColor("ORANGE"),
        label: "b",
        labelPosition: "middle",
      },
      {
        from: [0, 0, 0],
        to: [5, 4, 3],
        color: getColor("YELLOW"),
        label: "c = a + b",
      },
    ]}
  />
</div>

### Scalar Multiplication of Vectors

Multiplying a scalar <InlineMath math="k" /> with a vector <InlineMath math="\vec{a}" /> produces a new vector with the same direction (if <InlineMath math="k > 0" />) or opposite direction (if <InlineMath math="k < 0" />) and a magnitude <InlineMath math="|k|" /> times the magnitude of <InlineMath math="\vec{a}" />.

<BlockMath math="k\vec{a} = (k \cdot a_x, k \cdot a_y, k \cdot a_z)" />

<div className="mt-4">
  <Vector3d
    title="Scalar Multiplication of a Vector"
    description={
      <>
        Visualization of scalar multiplication <InlineMath math="k" /> times
        vector <InlineMath math="a" />, where <InlineMath math="k = 2" />.
      </>
    }
    vectors={[
      {
        from: [0, 0, 0],
        to: [2, 1, 2],
        color: getColor("EMERALD"),
        label: "a",
      },
      {
        from: [0, 0, 0],
        to: [4, 2, 4],
        color: getColor("FUCHSIA"),
        label: "2a",
      },
    ]}
    cameraPosition={[2, 4, 10]}
  />
</div>

### Dot Product

The dot product between two vectors <InlineMath math="\vec{a}" /> and <InlineMath math="\vec{b}" /> produces a scalar defined as:

<BlockMath math="\vec{a} \cdot \vec{b} = a_x b_x + a_y b_y + a_z b_z = |\vec{a}||\vec{b}|\cos\theta" />

where <InlineMath math="\theta" /> is the angle between the two vectors.

The dot product has the following properties:

1. <InlineMath math="\vec{a} \cdot \vec{b} = \vec{b} \cdot \vec{a}" /> (commutative)
2. <InlineMath math="\vec{a} \cdot \vec{b} = 0" /> if and only if <InlineMath math="\vec{a}" /> and <InlineMath math="\vec{b}" /> are
   perpendicular (orthogonal)
3. <InlineMath math="\vec{a} \cdot \vec{a} = |\vec{a}|^2" />

### Cross Product

The cross product between two vectors <InlineMath math="\vec{a}" /> and <InlineMath math="\vec{b}" /> produces a new vector <InlineMath math="\vec{c}" /> that is perpendicular to both vectors.

<BlockMath math="\vec{a} \times \vec{b} = (a_y b_z - a_z b_y, a_z b_x - a_x b_z, a_x b_y - a_y b_x)" />

The magnitude of the cross product is:

<BlockMath math="|\vec{a} \times \vec{b}| = |\vec{a}||\vec{b}|\sin\theta" />

where <InlineMath math="\theta" /> is the angle between the two vectors.

<Vector3d
  title="Cross Product of Vectors"
  description="Visualization of the cross product of vectors a and b producing vector c that is perpendicular to both."
  vectors={[
    {
      from: [0, 0, 0],
      to: [2, 0, 0],
      color: getColor("TEAL"),
      label: "a",
    },
    {
      from: [0, 0, 0],
      to: [0, 2, 0],
      color: getColor("ROSE"),
      label: "b",
    },
    {
      from: [0, 0, 0],
      to: [0, 0, 4],
      color: getColor("LIME"),
      label: "a × b",
    },
  ]}
  cameraPosition={[2, 6, 8]}
/>

## Applications of Three-Dimensional Vectors

Three-dimensional vectors have many applications in various fields:

1. **Physics**: To represent force, velocity, acceleration, and momentum in three-dimensional space
2. **Computer Graphics**: To represent position and movement of objects in three-dimensional space
3. **Robotics**: To control robot movement in space
4. **Navigation**: To determine direction and distance in three-dimensional space
5. **Mechanical Engineering**: For structural analysis and fluid mechanics
