Skip to content

Vectors

porusian edited this page Aug 10, 2022 · 46 revisions

Linear Combinations

The heart of linear algebra is in two operations-both with vectors. We add vectors to get v + w. We multiply them by numbers c and d to get c v and d w. Combining those two operations (adding c v to d w) gives the linear combination c v + d w.

Take all linear combinations of u, or u and v, or u, v, w. In three dimensions, those combinations typically fill a line, then a plane, and the whole space R3.

Column vector and row vectors

Column vectors has component defined for n dimensions as a column. Row vectors have the components defined for the same dimension.

Components of a Vector

The value of a vector along each axis is also called a component.

Vector Addition

v + w

Each component is added to the corresponding component to generate a new matrix component, as a vector is a column matrix.

Scalar Multiplication

A scalar is a number. A scaler is multiplied by each component or component in a matrix.

Image Projection

Extrinsic calibration and Intrinsic calibration matrices

A real-world image point coordinates are first converted to camera coordinates using an extrinsic calibration matrix and then to image coordinates using the intrinsic calibration matrix. Both of these matrices are transformation matrices. More details here.

Lengths and Dot Products

Dot product

This multiplication involves the separate products v1w1 and v2w2, but it doesn't stop there. Those two numbers are added to produce the single number v.w. This is the geometry section (lengths and angles).

  • The dot product w.v equals v.w. The order of v and w makes no difference.
  • In mathematics, zero is always a special number. For dot products, it means that these two vectors are perpendicular.

The main point: To compute v.w, multiply each vi times wi. Then add all vi wi.

Length

The length of a vector is the length of its arrow (the line and hat at the top, the usual representation of a vector on a graph). It is represented as

||v|| = sqrt(v.v)

Unit Vector

A unit vector u has length 1. Then

u.u = 1

  • The standard unit vectors along the x and y axes are written i and j . In the xy plane, the unit vector that makes an angle "theta" with the x axis is (cos theta, sin theta).
  • For a unit vector, divide any nonzero v by its length ||v||.
  • The unit vector u at angle 45° (left) divides v = (1, 1) by its length ||v|| = sqrt(2). The unit vector u = (cos theta, sin theta) is at angle theta.

Angle between vectors

  • The dot product is zero when the angle is 90°.
  • Now suppose v . w is not zero. It may be positive, it may be negative.
  • The angle is less than 90°when v . w is positive.
  • The angle is above 90° when v . w is negative.
  • Unit vectors at angle theta have u . U = cos theta.

Notes

  • Vectors are written in boldface italic.
  • 2-D plane
  • The geometric mean is defined as the nth root of the product of n numbers, i.e., for a set of numbers x1, x2, ..., xn, the geometric mean is defined as.

Geometric Mean = nth-root(x1 . x2 . x3 . ... . xn)

  • Plotting a 3d vector, see this video