User:Chili b/Linear Algebra

From Extremely Corporate Wiki
Jump to navigation Jump to search

This is a page for linear algebra stuff... Note: whenever a variable is in bold (such as: [math]\displaystyle{ \textbf{a} }[/math]), that variable refers to a vector unless otherwise noted.

The Basics

Vectors

A vector is the collection of scalars. The dimension of a vector is the number of scalars in it.

We can write vectors as either rows or columns like so: [math]\displaystyle{ \begin{bmatrix} 1 & 2 & 3 \end{bmatrix} }[/math] or [math]\displaystyle{ \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix} }[/math] where the vector with elements 1, 2, 3, is expressed first as a row vector and second as a column vector. The index of an element (or "component") is its position in the vector. For example: in both above vectors, 1 has index 0, 2 has index 1 and 3 has index 2. When the element at each index is equal between two vectors, they are pretty much equivalent regardless of their expression as a row vs. as a column. However, sometimes one representation is more conducive to what we're trying to do, so it helps to keep vectors in the form that's needed for clarity's sake.

Vector Algebra

  • The sum of two vectors of equal size is the vector where the element at each index is equal to the sum of the elements at said index from the first two vectors.
  • The difference of two vectors of equal size is the vector where the element at each index is equal to the difference of the elements at said index from the first two vectors.
  • A vector multiplied by a scalar is the vector where the element at each index is equal to the element at said index from the initial vector multiplied by the scalar.
    • Two vectors are parallel when one can be expressed as the product of some scalar with the other.
  • The length or norm of a vector is equal to the square root of the summation of squares of each of its components.
    • The length of a vector [math]\displaystyle{ \textbf{a} }[/math] is denoted by [math]\displaystyle{ ||\textbf{a}|| }[/math].
  • The dot product of two vectors of equal size is the vector where the element at each index is equal to the product of the elements at said index from the first two vectors.
    • Two vectors are orthogonal to each other when their dot product equals zero.
    • The dot product of a vector with itself is equal to the square of its length.
    • The dot product is denoted by [math]\displaystyle{ \textbf{a} \cdot \textbf{b} }[/math] for vectors a and b.
  • The cross product is only defined for 3-space. Its definition for [math]\displaystyle{ \textbf{a} = \begin{bmatrix}a_1 \\ a_2 \\ a_3 \end{bmatrix},~ \textbf{b} = \begin{bmatrix}b_1 \\ b_2 \\ b_3\end{bmatrix} }[/math] is [math]\displaystyle{ ~\textbf{a} \times \textbf{b} = \begin{bmatrix}a_2b_3 - b_3a_2 \\ a_3b_1 - b_3a_1 \\ a_1b_2 - b_1a_2\end{bmatrix} }[/math]
    • The cross product of two vectors is orthogonal to both.
  • The triangle inequality says [math]\displaystyle{ ||\textbf{a}|| + ||\textbf{b}|| \leq ||\textbf{a} + \textbf{b}|| }[/math]
  • The Cauchy-Shwarz inequality says [math]\displaystyle{ \textbf{a} \cdot \textbf{b} \leq ||\textbf{a}|| \cdot ||\textbf{b}|| }[/math]

Matrices

A matrix is like a row vector with multiple rows or a column vector with multiple columns. For example: [math]\displaystyle{ \begin{bmatrix}1 & 2 & 3 \\ 4 & 1 & 3 \\ 2 & 8 & 9\end{bmatrix} }[/math]

We denote the set of all matrices with [math]\displaystyle{ m }[/math] rows and [math]\displaystyle{ n }[/math] columns by [math]\displaystyle{ M_{m \times n} }[/math]