Monday, August 5, 2019

Linear Algebra 1. What is vector and scalar.

There are 3 views on vectors:

  1. physics view - arrows pointing in space, having length, direction and also you can move it all around - it is still the same vector
  2. computer science - ordered lists of numbers (order matters) and dimension describes length of that list
  3. mathematics - generalize both views: a vector can be anything where there is sensible notion of adding 2 vectors and multiplying a vector by a number: v⃗+w⃗ and 2v⃗
Geometrically vector is an arrow inside a coordinate system and that coordinates shows move from the origin ([0,0] coordinates of the Cartesian coordinate system) to the tip of the vector.

Vector addition - is like encoding the endpoint of the whole way as group of vectors starting at each turn and each of them encoding direction and length of that part of road:

  1. whole way: go 1 to the right and 2 up, then 3 to the right and 1 down:
    1. here we have 2 parts of the whole way:
      1. 1 to the right and 2 up - we'll encode that v⃗  [1,2]
      2. 3 to the right and 1 down - we'll encode that w⃗ [3,-1]
  2. so we have 2 vectors - v⃗  [1,2] and w⃗ [3,-1], 
  3. then v⃗+w⃗ = [1+3 , 2 + (-1)] = [4,1]
  4. for better understanding:
    1. take a piece of squared paper
    2. draw the whole way using notebook squares to measure steps
    3. draw v and w vectors on the Cartesian plane
Multiplication by a number - this means stretching and squishing of vector or changing its direction:
if v⃗  is [1,2], then 2v⃗ = 2[1,2] = [2*1 , 2*2] = [2, 4] . This also called scaling, and numbers used to scale (stretch, squish, change of the direction) are called scalars. Scalar is just a single number.

We can identify each individual number in a vector by it's index: v⃗  [1,3,5,7,9,2]  v3= 5

By convention we can show vector in bold lowercase or in non-bold lowercase with the arrow above (v or v⃗) and vector elements are non-bold lowercase with subscript.

If we want to index a set of elementsof a vector, then we define set containing the indices and write this set as subscript:

  1. x is [2,3,4,6,1,8,4] we need 1st, 4th, 5th elements (x1,x4,x5)
  2. define set S={1,4,5}
  3. xS
x-1 means all elements but x1
x-S means all elements but x1,x4,x5

These materials were used while preparing this blog-post:

No comments:

Post a Comment