# Nakafa Learning Content

> For AI agents: use [llms.txt](https://nakafa.com/llms.txt) for the site index. Markdown versions are available by appending `.md` to content URLs or sending `Accept: text/markdown`.

URL: https://nakafa.com/en/subjects/mathematics/vector-operations/three-dimensional-vector
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/material/lesson/mathematics/vector-operations/three-dimensional-vector/en.mdx

Learn three-dimensional vectors with interactive visualizations. Learn 3D vector operations, dot & cross products, and real-world applications.

---

## 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).

Visible text: 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 (- and -axes), three-dimensional vectors exist in space with three coordinate axes (, , and axes).

Component: Vector3d
Props:
- title: Vector in Three-Dimensional Space
- description: Visualization of a vector in three-dimensional space with{" "}
$$x$$, $$y$$, and{" "}
$$z$$ components.
  Visible text: Visualization of a vector in three-dimensional space with{" "}
, , and{" "}
 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: $$\vec{a}$$ or $$\overrightarrow{PQ}$$
2. Component notation: $$(a_x, a_y, a_z)$$ or $$(a_1, a_2, a_3)$$
3. Basis notation: $$a_x\vec{i} + a_y\vec{j} + a_z\vec{k}$$

Visible text: 1. Letter notation with an arrow above it: or 
2. Component notation: or 
3. Basis notation:

### 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:

```math
\vec{a} = (a_x, a_y, a_z) = a_x\vec{i} + a_y\vec{j} + a_z\vec{k}
```

where:

- $$a_x$$ is the vector component on the $$x$$
  -axis
- $$a_y$$ is the vector component on the $$y$$
  -axis
- $$a_z$$ is the vector component on the $$z$$
  -axis
- $$\vec{i}, \vec{j}, \vec{k}$$ are the unit vectors on the $$x$$
  ,
  $$y$$, and $$z$$ axes

Visible text: - is the vector component on the 
 -axis
- is the vector component on the 
 -axis
- is the vector component on the 
 -axis
- are the unit vectors on the 
 ,
 , and axes

Component: ContentBlock
Children:
Component: Vector3d
Props:
- title: Components of a Three-Dimensional Vector
- description: Three-dimensional vector with components on the $$x$$,
$$y$$, and $$z$$ axes.
  Visible text: Three-dimensional vector with components on the ,
, and 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]

## Magnitude of Three-Dimensional Vectors

The magnitude or length of a three-dimensional vector $$\vec{a} = (a_x, a_y, a_z)$$ is determined by the formula:

Visible text: The magnitude or length of a three-dimensional vector is determined by the formula:

```math
|\vec{a}| = \sqrt{a_x^2 + a_y^2 + a_z^2}
```

**Example**:

If $$\vec{a} = (3, 4, 5)$$, then the magnitude of vector $$\vec{a}$$ is:

Visible text: If , then the magnitude of vector is:

```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 $$\vec{a} = (a_x, a_y, a_z)$$ and $$\vec{b} = (b_x, b_y, b_z)$$, then:

Visible text: If and , then:

Component: MathContainer
Children:

```math
\vec{a} + \vec{b} = (a_x + b_x, a_y + b_y, a_z + b_z)
```

```math
\vec{a} - \vec{b} = (a_x - b_x, a_y - b_y, a_z - b_z)
```

Component: ContentBlock
Children:
Component: Vector3d
Props:
- title: Vector Addition in Three Dimensions
- description: Visualization of adding vectors $$a$$ and{" "}
$$b$$ to produce vector{" "}
$$c = a + b$$.
  Visible text: Visualization of adding vectors and{" "}
 to produce vector{" "}
.
- 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",
},
]

### Scalar Multiplication of Vectors

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

Visible text: Multiplying a scalar with a vector produces a new vector with the same direction (if ) or opposite direction (if ) and a magnitude the magnitude of .

```math
k\vec{a} = (k \cdot a_x, k \cdot a_y, k \cdot a_z)
```

Component: ContentBlock
Children:
Component: Vector3d
Props:
- title: Scalar Multiplication of a Vector
- description: Visualization of scalar multiplication $$k\text{ times}$$
vector $$a$$, where $$k = 2$$.
  Visible text: Visualization of scalar multiplication 
vector , where .
- 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]

### Dot Product

The dot product between two vectors $$\vec{a}$$ and $$\vec{b}$$ produces a scalar defined as:

Visible text: The dot product between two vectors and produces a scalar defined as:

```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 $$\theta$$ is the angle between the two vectors.

Visible text: where is the angle between the two vectors.

The dot product has the following properties:

1. $$\vec{a} \cdot \vec{b} = \vec{b} \cdot \vec{a}$$ (commutative)
2. $$\vec{a} \cdot \vec{b} = 0$$ if and only if $$\vec{a}$$ and $$\vec{b}$$ are
   perpendicular (orthogonal)
3. $$\vec{a} \cdot \vec{a} = |\vec{a}|^2$$

Visible text: 1. (commutative)
2. if and only if and are
 perpendicular (orthogonal)
3.

### Cross Product

The cross product between two vectors $$\vec{a}$$ and $$\vec{b}$$ produces a new vector $$\vec{c}$$ that is perpendicular to both vectors.

Visible text: The cross product between two vectors and produces a new vector that is perpendicular to both vectors.

```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:

```math
|\vec{a} \times \vec{b}| = |\vec{a}||\vec{b}|\sin\theta
```

where $$\theta$$ is the angle between the two vectors.

Visible text: where is the angle between the two vectors.

Component: Vector3d
Props:
- title: Cross Product of Vectors
- description: Visualization of the cross product of vectors $$\vec{a}$$ and $$\vec{b}$$ producing vector $$\vec{c}$$ that is perpendicular to both.
  Visible text: Visualization of the cross product of vectors and producing vector 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