Linear Algebra

3.1 Vectors in 2-Space, 3-Space, and n-Space

Imron Rosyadi

Linear Algebra for ECE

Chapter 3: Vectors in Space

Introduction to Vectors

Linear algebra focuses on matrices and vectors.

This section extends your understanding of vectors from 2D/3D to \(n\)-space.

Geometric Vectors

Engineers and physicists represent vectors using arrows.

  • Direction: Specified by the arrowhead.
  • Magnitude (Length): Specified by the length of the arrow.
  • Initial Point: The tail of the arrow.
  • Terminal Point: The tip of the arrow.

Vector Notation

A vector \(\mathbf{v}\) with initial point \(A\) and terminal point \(B\) is written as:

\[ \mathbf{v} = \overrightarrow{AB} \]

Boldface Notation: We denote vectors in boldface type, like \(\mathbf{a}, \mathbf{b}, \mathbf{v}, \mathbf{w}, \mathbf{x}\). Scalars are in lowercase italic type, like \(a, k, v, w, x\).

Equivalent Vectors and the Zero Vector

  • Equivalent Vectors: Vectors with the same length and direction are considered equivalent (or equal). \[ \mathbf{v} = \mathbf{w} \] This means they are the “same vector” even if located differently.

  • Zero Vector (\(\mathbf{0}\)): A vector whose initial and terminal points coincide, having zero length.

    • It has no natural direction, so we can assign any convenient direction.

Vector Addition: Geometric Rules

Parallelogram Rule: If \(\mathbf{v}\) and \(\mathbf{w}\) share an initial point, their sum \(\mathbf{v} + \mathbf{w}\) is the diagonal of the parallelogram formed by \(\mathbf{v}\) and \(\mathbf{w}\).

Triangle Rule (Tip-to-Tail): If the initial point of \(\mathbf{w}\) is at the terminal point of \(\mathbf{v}\), then \(\mathbf{v} + \mathbf{w}\) is the vector from the initial point of \(\mathbf{v}\) to the terminal point of \(\mathbf{w}\).

\[ \mathbf{v} + \mathbf{w} = \mathbf{w} + \mathbf{v} \tag{1} \]

Parallelogram Rule

Triangle Rule.

Commutativity.

Interactive Vector Addition (2D)

Adjust the components of \(\mathbf{v}\) and \(\mathbf{w}\) to see their sum.

Vector Addition as Translation

Vector addition can also be seen as translating points.

  • The terminal point of \(\mathbf{v} + \mathbf{w}\) is the point resulting from translating the terminal point of \(\mathbf{v}\) in the direction of \(\mathbf{w}\) by a distance equal to the length of \(\mathbf{w}\).
    • Equivalently: translating the terminal point of \(\mathbf{w}\) in the direction of \(\mathbf{v}\) by the length of \(\mathbf{v}\).

Translation of \(\mathbf{v}\) by \(\mathbf{w}\).

Vector Subtraction

Subtraction is defined in terms of addition: \(a - b = a + (-b)\).

  • Negative of a Vector (\(\mathbf{-v}\)): Has the same length as \(\mathbf{v}\) but is oppositely directed.
  • Vector Subtraction (\(\mathbf{w} - \mathbf{v}\)): Defined as the sum \(\mathbf{w} + (-\mathbf{v})\). \[ \mathbf{w} - \mathbf{v} = \mathbf{w} + (-\mathbf{v}) \tag{2} \]

Geometrically, \(\mathbf{w} - \mathbf{v}\) is the vector from the terminal point of \(\mathbf{v}\) to the terminal point of \(\mathbf{w}\), when both start at the same initial point.

Interactive Vector Subtraction (2D)

Adjust \(\mathbf{v}\) and \(\mathbf{w}\) to see their difference \(\mathbf{w} - \mathbf{v}\).

Scalar Multiplication

Scalars change the length and/or reverse the direction of a vector.

  • If \(k > 0\), \(k\mathbf{v}\) has the same direction as \(\mathbf{v}\) and length \(|k|\) times \(\mathbf{v}\).
  • If \(k < 0\), \(k\mathbf{v}\) has the opposite direction of \(\mathbf{v}\) and length \(|k|\) times \(\mathbf{v}\).
  • If \(k = 0\) or \(\mathbf{v} = \mathbf{0}\), then \(k\mathbf{v} = \mathbf{0}\).

From this, we see: \[ (-1)\mathbf{v} = -\mathbf{v} \tag{3} \]

Interactive Scalar Multiplication (2D)

Adjust the scalar \(k\) and vector \(\mathbf{v}\) to see the result \(k\mathbf{v}\).

Parallel and Collinear Vectors

If one vector is a scalar multiple of another (\(\mathbf{w} = k\mathbf{v}\)), they are parallel.

  • If they share a common initial point, they are also collinear.
  • Translating a vector does not change it, so parallel and collinear mean the same thing for vectors.
  • The zero vector \(\mathbf{0}\) is regarded as parallel to all vectors.

Parallel and collinear vectors.

Sums of Three or More Vectors

Vector addition is associative: \[ \mathbf{u} + (\mathbf{v} + \mathbf{w}) = (\mathbf{u} + \mathbf{v}) + \mathbf{w} \] This means the order of grouping doesn’t matter.

Tip-to-Tail Method: Place vectors sequentially (tip-to-tail). The sum is from the initial point of the first to the terminal point of the last.

Sum of three vectors (tip-to-tail).

Vectors in Coordinate Systems

Computations are simpler with coordinate systems.

  • If a vector \(\mathbf{v}\) has its initial point at the origin, its components are the coordinates of its terminal point.
    • 2-space: \(\mathbf{v} = (v_1, v_2)\)
    • 3-space: \(\mathbf{v} = (v_1, v_2, v_3)\)
  • The zero vector: \(\mathbf{0} = (0,0)\) in 2-space, \(\mathbf{0} = (0,0,0)\) in 3-space.

Vectors in coordinate systems.

Equivalent Vectors in Coordinates

Two vectors are equivalent if and only if their corresponding components are equal.

For \(\mathbf{v} = (v_1, v_2, v_3)\) and \(\mathbf{w} = (w_1, w_2, w_3)\) in 3-space: \[ \mathbf{v} = \mathbf{w} \quad \text{if and only if} \quad v_1 = w_1, \quad v_2 = w_2, \quad v_3 = w_3 \]

Note

Point vs. Vector: An ordered pair \((v_1, v_2)\) can represent a point (a location) or a vector (a displacement from the origin). The context determines the interpretation.

The ordered pair \((v_1, v_2)\) can represent a point or a vector.

Vectors Not at the Origin

If a vector’s initial point is not the origin, its components are found by subtracting the initial point’s coordinates from the terminal point’s.

  • For \(\overrightarrow{P_1P_2}\) with \(P_1(x_1,y_1)\) and \(P_2(x_2,y_2)\): \[ \overrightarrow{P_1P_2} = (x_2 - x_1, y_2 - y_1) \tag{4} \]
  • For \(\overrightarrow{P_1P_2}\) with \(P_1(x_1,y_1,z_1)\) and \(P_2(x_2,y_2,z_2)\): \[ \overrightarrow{P_1P_2} = (x_2 - x_1, y_2 - y_1, z_2 - z_1) \tag{5} \]

Vectors Not at the Origin

Vector \(\overrightarrow{P_1P_2}\) as difference of position vectors.

EXAMPLE 1: Finding the Components of a Vector

Find the components of the vector \(\mathbf{v} = \overrightarrow{P_1P_2}\) with:

Initial point \(P_1(2, -1, 4)\)

Terminal point \(P_2(7, 5, -8)\)

\[ \mathbf{v} = (7 - 2, 5 - (-1), (-8) - 4) = (5, 6, -12) \]

Interactive Component Calculator

Enter coordinates to find vector components.

\(n\)-Space: Generalizing Dimensions

What if we need more than three dimensions?

  • Ordered \(n\)-tuple: A sequence of \(n\) real numbers \((v_1, v_2, \ldots, v_n)\).
  • \(n\)-Space (\(R^n\)): The set of all ordered \(n\)-tuples.

Tip

Think of \(n\)-tuples as: - Coordinates of a generalized point. - Components of a generalized vector. The choice depends on the problem context.

Applications of \(n\)-tuples in ECE and Beyond

  • Experimental Data: \(n\) measurements form a vector \(\mathbf{y} = (y_1, \ldots, y_n)\) in \(R^n\).
    • Example: Sensor readings from an array.
  • Storage/Warehousing: Distribution of items across \(n\) locations: \(\mathbf{x} = (x_1, \ldots, x_n)\).
    • Example: Inventory levels in a distributed system.
  • Electrical Circuits: Input/output voltages for a chip.
    • Input \(\mathbf{v} \in R^4\), Output \(\mathbf{w} \in R^3\). Chip maps \(R^4 \to R^3\).
  • Graphical Images: Pixel data (x, y, hue, saturation, brightness) as a 5-tuple.
    • \(\mathbf{v} = (x, y, h, s, b)\).
  • Economics: Economic output of \(n\) sectors as \(\mathbf{s} = (s_1, \ldots, s_n)\).
  • Mechanical Systems: State of particles (position, velocity, time).
    • \(\mathbf{v} = (x_1, \ldots, x_6, v_1, \ldots, v_6, t)\) in \(R^{13}\).

Vector Equivalence in \(R^n\)

Vectors \(\mathbf{v} = (v_1, \ldots, v_n)\) and \(\mathbf{w} = (w_1, \ldots, w_n)\) in \(R^n\) are equivalent (equal) if:

\[ v_1 = w_1, \quad v_2 = w_2, \quad \ldots, \quad v_n = w_n \] We write this as \(\mathbf{v} = \mathbf{w}\).

EXAMPLE 2: Equality of Vectors

\[ (a, b, c, d) = (1, -4, 2, 7) \] if and only if \(a = 1, b = -4, c = 2,\) and \(d = 7\).

Algebraic Operations in \(R^n\) (Component-wise)

Operations on vectors in \(R^n\) are natural extensions of those in \(R^2\) and \(R^3\).

For \(\mathbf{v} = (v_1, v_2)\) and \(\mathbf{w} = (w_1, w_2)\) in \(R^2\): \[ \begin{array}{l} \mathbf{v} + \mathbf{w} = (v_1 + w_1, v_2 + w_2) \\ k\mathbf{v} = (k v_1, k v_2) \end{array} \tag{7} \] And similarly for subtraction and negative vectors: \[ -\mathbf{v} = (-v_1, -v_2) \tag{8} \] \[ \mathbf{w} - \mathbf{v} = (w_1 - v_1, w_2 - v_2) \tag{9} \]

Algebraic Operations in \(R^n\) (Component-wise)

Figure 3.1.13: Geometric interpretation of component-wise operations.

Formal Definitions of Operations in \(R^n\)

If \(\mathbf{v} = (v_1, \ldots, v_n)\) and \(\mathbf{w} = (w_1, \ldots, w_n)\) are vectors in \(R^n\), and \(k\) is a scalar:

\[ \begin{array}{r l} \mathbf{v} + \mathbf{w} &= (v_1 + w_1, v_2 + w_2, \ldots, v_n + w_n)\\ k\mathbf{v} &= (k v_1, k v_2, \ldots, k v_n)\\ -\mathbf{v} &= (-v_1, -v_2, \ldots, -v_n)\\ \mathbf{w} - \mathbf{v} &= (w_1 - v_1, w_2 - v_2, \ldots, w_n - v_n) \end{array} \tag{13} \]

EXAMPLE 3: Algebraic Operations Using Components

If \(\mathbf{v} = (1, -3, 2)\) and \(\mathbf{w} = (4, 2, 1)\), then: \[ \begin{array}{r l} \mathbf{v} + \mathbf{w} &= (5, -1, 3) \\ 2\mathbf{v} &= (2, -6, 4) \\ -\mathbf{w} &= (-4, -2, -1) \\ \mathbf{v} - \mathbf{w} &= (-3, -5, 1) \end{array} \]

Interactive Vector Operations in \(R^3\)

Perform vector addition, subtraction, and scalar multiplication.

Properties of Vector Operations (Theorem 3.1.1)

If \(\mathbf{u},\mathbf{v},\) and \(\mathbf{w}\) are vectors in \(R^n\), and \(k\) and \(m\) are scalars:

  1. \(\mathbf{u} + \mathbf{v} = \mathbf{v} + \mathbf{u}\) (Commutative Law for Addition)
  2. \((\mathbf{u} + \mathbf{v}) + \mathbf{w} = \mathbf{u} + (\mathbf{v} + \mathbf{w})\) (Associative Law for Addition)
  3. \(\mathbf{u} + \mathbf{0} = \mathbf{0} + \mathbf{u} = \mathbf{u}\) (Additive Identity)
  4. \(\mathbf{u} + (-\mathbf{u}) = \mathbf{0}\) (Additive Inverse)
  5. \(k(\mathbf{u} + \mathbf{v}) = k\mathbf{u} + k\mathbf{v}\) (Distributive Law)
  6. \((k + m)\mathbf{u} = k\mathbf{u} + m\mathbf{u}\) (Distributive Law)
  7. \(k(m\mathbf{u}) = (km)\mathbf{u}\) (Associative Law for Scalar Multiplication)
  8. \(1\mathbf{u} = \mathbf{u}\) (Multiplicative Identity)

Proof of Associative Law (b)

Let \(\mathbf{u} = (u_1, \ldots, u_n)\), \(\mathbf{v} = (v_1, \ldots, v_n)\), \(\mathbf{w} = (w_1, \ldots, w_n)\).

\[ \begin{array}{r l} (\mathbf{u} + \mathbf{v}) + \mathbf{w} &= \big((u_1,\ldots,u_n) + (v_1,\ldots,v_n)\big) + (w_1,\ldots,w_n)\\ &= (u_1 + v_1, \ldots, u_n + v_n) + (w_1,\ldots,w_n) & \text{[Vector addition]} \\ &= \big((u_1 + v_1) + w_1, \ldots, (u_n + v_n) + w_n\big) & \text{[Vector addition]} \\ &= \big(u_1 + (v_1 + w_1), \ldots, u_n + (v_n + w_n)\big) & \text{[Regroup real numbers]} \\ &= (u_1,\ldots,u_n) + (v_1 + w_1, \ldots, v_n + w_n) & \text{[Vector addition]} \\ &= \mathbf{u} + (\mathbf{v} + \mathbf{w}) \end{array} \]

Additional Vector Properties (Theorem 3.1.2)

If \(\mathbf{v}\) is a vector in \(R^n\) and \(k\) is a scalar:

  1. \(0\mathbf{v} = \mathbf{0}\)
  2. \(k\mathbf{0} = \mathbf{0}\)
  3. \((-1)\mathbf{v} = -\mathbf{v}\)

Calculating Without Components

These theorems allow algebraic manipulation of vector equations without explicit component calculations.

Example: Solve \(\mathbf{x} + \mathbf{a} = \mathbf{b}\) for \(\mathbf{x}\).

\[ \begin{array}{r l r l} \mathbf{x} + \mathbf{a} &= \mathbf{b} & & \mathrm{[Given]}\\ (\mathbf{x} + \mathbf{a}) + (-\mathbf{a}) &= \mathbf{b} + (-\mathbf{a}) & & \mathrm{[Add~negative~of~a~to~both~sides]}\\ \mathbf{x} + (\mathbf{a} + (-\mathbf{a})) &= \mathbf{b} - \mathbf{a} & & \mathrm{[Part~}(b)\mathrm{~of~Thm~}3.1.1]\\ \mathbf{x} + \mathbf{0} &= \mathbf{b} - \mathbf{a} & & \mathrm{[Part~}(d)\mathrm{~of~Thm~}3.1.1]\\ \mathbf{x} &= \mathbf{b} - \mathbf{a} & & \mathrm{[Part~}(c)\mathrm{~of~Thm~}3.1.1] \end{array} \]

Linear Combinations

A vector \(\mathbf{w}\) in \(R^n\) is a linear combination of vectors \(\mathbf{v}_1, \ldots, \mathbf{v}_r\) in \(R^n\) if it can be expressed as:

\[ \mathbf{w} = k_1\mathbf{v}_1 + k_2\mathbf{v}_2 + \dots + k_r\mathbf{v}_r \tag{14} \] where \(k_1, \ldots, k_r\) are scalars (coefficients).

Example: If \(\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_3\) are vectors:

\(\mathbf{u} = 2\mathbf{v}_1 + 3\mathbf{v}_2 + \mathbf{v}_3\)

\(\mathbf{w} = 7\mathbf{v}_1 - 6\mathbf{v}_2 + 8\mathbf{v}_3\)

Important

Linear combinations are central to many concepts in linear algebra, including span, basis, and transformations.

Interactive Linear Combination

Calculate a linear combination of two 2D vectors.

Alternative Notations for Vectors

Vectors can be written in several forms, depending on context and convenience.

  1. Comma-delimited form: \[ \mathbf{v} = (v_1, v_2, \ldots, v_n) \tag{15} \]
  2. Row-vector form: \[ \mathbf{v} = [v_1 \quad v_2 \quad \dots \quad v_n] \tag{16} \]
  3. Column-vector form: \[ \mathbf{v} = \left[ \begin{array}{c}v_1 \\ v_2 \\ \vdots \\ v_n \end{array} \right] \tag{17} \]

Application: RGB Color Models

RGB color model: colors on computer monitors are created by adding percentages of Red (R), Green (G), and Blue (B).

  • Primary colors as vectors in \(R^3\):
    • \(\mathbf{r} = (1,0,0)\) (pure red)
    • \(\mathbf{g} = (0,1,0)\) (pure green)
    • \(\mathbf{b} = (0,0,1)\) (pure blue)
  • Any color \(\mathbf{c}\) in the RGB color cube is a linear combination: \[ \begin{array}{rl} \mathbf{c} &= k_1\mathbf{r} + k_2\mathbf{g} + k_3\mathbf{b}\\ &= k_1(1,0,0) + k_2(0,1,0) + k_3(0,0,1)\\ &= (k_1,k_2,k_3) \end{array} \] where \(0 \leq k_i \leq 1\).

Application: RGB Color Models

RGB Color Cube.

Interactive RGB Color Mixer

Adjust the Red, Green, and Blue components (\(k_1, k_2, k_3\)) to mix colors.

Summary and Key Takeaways

  • Geometric Vectors: Visualized as arrows, defined by magnitude and direction.
  • Vector Operations: Addition, subtraction, and scalar multiplication have clear geometric and algebraic interpretations.
  • Coordinate Systems: Allow for algebraic manipulation of vectors via components.
  • \(n\)-Space: Generalizes vector concepts to higher dimensions, crucial for complex data.
  • Linear Combinations: Fundamental for building new vectors and understanding vector relationships.
  • Real-world Applications: Vectors are ubiquitous in ECE, from signal processing to computer graphics.