keep in mind that our discussions would only involve the field

If 𝑛 is a vector space over then a subset 𝑆 of 𝑛 is said to be a subspace of vector space 𝑛, if 𝑆 is also a vector space over the same field . (The definition holds for any vector space V over field F but in machine learning the 𝑛 vector space is more common.)

An alternative definition, these three imply all six of a vector space’s properties as discussed in a previous note:
If 𝑛 is a vector space, then 𝑆𝑛 is said to be a subspace of 𝑉=𝑛() if:

  • 0𝑆
  • 𝑆 is closed under vector addition, so 𝑥,𝑦𝑆 implies 𝑥+𝑦𝑆
  • 𝑆 is closed under scalar multiplication, so 𝑥𝑆,𝛼 implies 𝛼𝑥𝑆

Theorem that follows the alternative definition:
Let W be a subset of 𝑛. Then W is a subspace of 𝑛 if and only if the following conditions hold:
a) W is non empty (we are looking for zero vector here)
b) For any 𝑎,𝑏 and any 𝑢,𝑣𝑊: 𝑎𝑢+𝑏𝑣𝑊

examples:

  • Let 𝑉(𝑅) be a vector space, then 𝑆={0} and 𝑆=𝑉 are subspaces of 𝑉 and are called trivial subspaces.
  • The set 𝑆={(𝑥1,𝑥2,𝑥3)3|𝑥1𝑥2+𝑥3=0} is a subspace of 3
    • Let’s try to show it. The zero vector of 3 is given as (0,0,0). This is a vector in 𝑆 as 00+0=0. Therefore, 𝑆 is non-empty.
    • Let 𝑎,𝑏 and (𝑥1,𝑥2,𝑥3),(𝑦1,𝑦2,𝑦3) be vectors in 𝑆. Thus 𝑥1𝑥2+𝑥3=0 and 𝑦1𝑦2+𝑦3=0. We have to show that 𝑎(𝑥1,𝑥2,𝑥3)+𝑏(𝑦1,𝑦2,𝑦3)𝑆. 𝑎(𝑥1,𝑥2,𝑥3)+𝑏(𝑦1,𝑦2,𝑦3)=(𝑎𝑥1+𝑏𝑦1,𝑎𝑥2+𝑏𝑦2,𝑎𝑥3+𝑏𝑦3)=𝑢. Now is 𝑢𝑆? We can do 𝑥1𝑥2+𝑥3 on 𝑢 and check if it’s 0. Thus (𝑎𝑥1+𝑏𝑦1𝑎𝑥2𝑏𝑦2+𝑎𝑥3+𝑏𝑦3)=𝑎(𝑥1𝑥2+𝑥3)+𝑏(𝑦1𝑦2+𝑦3)=0 because recall that (𝑥1,𝑥2,𝑥3),(𝑦1,𝑦2,𝑦3)𝑆 so (𝑥1𝑥2+𝑥3)=(𝑦1𝑦2+𝑦3)=0
  • similarly, the set 𝑆={(𝑥1,𝑥2,𝑥3)3|𝑥1=𝑥2=𝑥3} is a subspace of 3
  • {(𝑥1,𝑥2,𝑥3)3|𝑥1+𝑥2+𝑥3=1} is NOT a subspace of 3
    • Let’s try to show it. First, the zero vector for 3 is (0,0,0). So even the first condition is not satisfied as 0+0+01
  • If we have a subspace of 3, then geometrically:
    • it’s the origin
    • it’s a line passing through the origin
    • it’s a plane passing through the origin
    • or 3 itself. The first and last conditions are “trivial”.

Some results:

  1. The intersection of a non-empty collection of subspaces of 𝑛 is a subspace of 𝑛; or if 𝑆1,𝑆2 are subspaces of 𝑉, 𝑆1𝑆2 is a subspace of V.
  2. The union of two subspaces of 𝑛 is a subspace of 𝑛 iff one of them is contained in the other

Linear independence

keep in mind that sometimes I have represented vectors without bold or an arrow, but generally any “element” in S is a vector as it’s a set of vectors.

Consider a vector space 𝑉 and a finite number of vectors 𝒙𝟏,,𝒙𝒌. Then every 𝒗𝑉 of the form:
𝒗=𝜆1𝒙𝟏++𝜆𝑘𝒙𝒌=𝑘𝑖=1𝜆𝑖𝒙𝒊𝑉
with 𝜆1,,𝜆𝑘 is a linear combination of vectors 𝒙𝟏,,𝒙𝒌.

Let us consider a vector space 𝑉 with 𝑘 and 𝒙𝟏,,𝒙𝒌𝑉. If there is a non-trivial linear combination such that 𝟎=𝑘𝑖=1𝜆𝑖𝒙𝒊 with at least one 𝜆𝑖0, the vectors 𝒙𝟏,,𝒙𝒌 are linearly dependent. If only the trivial solution exists, i.e. 𝜆1==𝜆𝑘=0 the vectors 𝒙𝟏,,𝒙𝒌 are linearly independent.
Some properties to find whether vectors are linearly independent:

  • k vectors are either linearly dependent or independent, there is no third option
  • if at least one of the vectors in 𝒙𝟏,,𝒙𝒌 is 𝟎, then they are linearly dependent. The same holds if two vectors are identical.
  • A practical way of checking whether vectors 𝒙𝟏,,𝒙𝒌𝑉 are linearly independent is to use Gaussian elimination. Write all vectors as columns of matrix 𝐴 and perform Gaussian elimination until the matrix is in row-echelon form.
    • The pivot columns indicate the vectors which are linearly independent of the vectors on the left.
    • The non pivot columns can be expressed as linear combinations of the pivot columns on their left.
    • ex. in row echelon form (103002) we can say that the first and third columns are pivot columns. The second column is a non pivot column as it’s three times the first column.
    • All column vectors are linearly independent iff all columns are pivot columns. If there is at least one non pivot column, the columns and thus the corresponding vectors are linearly dependent.
      Keep in mind that we use Gaussian elimination because we follow the general approach and solve 𝜆1𝒙𝟏++𝜆𝑛𝒙𝒏=0.
      ex. consider 4 with
𝒙𝟏=(1234),𝒙𝟐=(1102),𝒙𝟑=(1211)

to check whether they are linearly independent, we solve:
𝜆1𝒙1+𝜆2𝒙2+𝜆3𝒙3=𝜆1(1234)+𝜆2(1102)+𝜆3(1211)=𝟎
for the row echelon form step

(123411021211)(100011001010)

here every column is a pivot column and so there is no non-trivial solution and we require 𝜆1=𝜆2=𝜆3=0 to solve the equation system. Hence vectors 𝒙1,𝒙2,𝒙3 are linearly independent.

span or linear span

Let 𝑉(𝐹) be a vector space over field F. Let 𝑆={𝑣1,𝑣2,,𝑣𝑛} be a non-empty subset of 𝑉. Then the set 𝐿(𝑆)={𝑐1𝑣1+𝑐2𝑣2++𝑐𝑛𝑣𝑛|𝑐𝑖,1𝑖𝑛} is a linear span of set 𝑆. The span of S is also denoted by span(𝑆) and is the set of all finite linear combinations of elements (vectors) of 𝑆.

ex. consider the set 𝑆={(0,1),(1,0)};𝑆2. 𝐿(𝑆)=𝑐1(0,1)+𝑐2(1,0);𝑐1,𝑐2 which is nothing but {(𝑐2,𝑐1)|𝑐1,𝑐2}=2. Thus the linear span of the given set was 2.

ex. consider the set 𝑆={(1,1,1),(2,1,3)}; 𝐿(𝑆)={𝑐1(1,1,1)+𝑐2(2,1,3)|𝑐1,𝑐2} which is {(𝑐1+2𝑐2),(𝑐1+𝑐2),(𝑐1+3𝑐2)}={(𝑥1,𝑥2,𝑥3|2𝑥1𝑥3𝑥2=0)} which is also a subspace of 3.

some results:

  1. Let V(F) be a vector space and let S be a non-empty subset of V. Then L(S) is a subspace of V.

    • proof: the span of S is 𝐿(𝑆)=span(𝑆)={𝜆1𝑣1+𝜆2𝑣2++𝜆𝑛𝑣𝑛:𝜆1,,𝜆𝑛𝐹}. Now, the additive identity 0 is in span(S) because 0=0𝑣1+0𝑣2++0𝑣𝑛, so the first condition is satisfied. Keep in mind that in this set the only element is 𝜆1𝑣1+𝜆2𝑣2++𝜆𝑛𝑣𝑛. Let’s now take two elements of this set and add them to check closure: (𝑎1𝑣1+𝑎2𝑣2++𝑎𝑛𝑣𝑛)+(𝑏1𝑣1+𝑏2𝑣2++𝑏𝑛𝑣𝑛)=𝜆1𝑣1+𝜆2𝑣2++𝜆𝑛𝑣𝑛𝐿(𝑆). Thus addition is closed. Also, let’s take a scalar and multiply it with an element: 𝑘(𝑎1𝑣1+𝑎2𝑣2++𝑎𝑛𝑣𝑛)=𝜆1𝑣1+𝜆2𝑣2++𝜆𝑛𝑣𝑛𝐿(𝑆). Thus scalar multiplication is also closed and hence the span is a subspace of V.
  2. Let S be a non-empty subset of a vector space V. Then L(S) is the smallest subspace of V(F) containing S.

    • proof: we know that the span(S) is a subspace of V by the previous proof. Now, consider the fact that span(𝑆) contains each vector in 𝑆 because if you take an arbitrary vector 𝑣𝑘 it’s a linear combination of other vectors (set all other 𝜆‘s to 0 and 𝜆𝑘 to 1). Also consider that because subspaces are closed under scalar multiplication and addition, every subspace of V that contains each 𝑣𝑘 also has to contain span(𝑆) because it too contains each 𝑣𝑘. Thus span is the smallest subspace of V containing all the vectors {𝑣1,𝑣2,,𝑣𝑛} or S.

Some important subspaces for dimensional reduction

let the matrix

𝐴𝑚,𝑛=(𝑎11𝑎21𝑎𝑚1𝑎12𝑎22𝑎𝑚2𝑎1𝑛𝑎2𝑛𝑎𝑚𝑛)

where 𝑎𝑖𝑗. Then:

  1. The row space of 𝐴 given by 𝐿({(𝑎11,𝑎12,,𝑎1𝑛,(𝑎21,𝑎22,,𝑎2𝑛),,(𝑎𝑚1,𝑎𝑚2,,𝑎𝑚𝑛)))}) is a subspace of 𝑛()
  2. The column space of 𝐴 given by 𝐿({(𝑎11,𝑎21,,𝑎𝑚1,(𝑎12,𝑎22,,𝑎𝑚2),,(𝑎1𝑛,𝑎2𝑛,,𝑎𝑚𝑛)))}) is a subspace of 𝑚()
  3. The set 𝑁(𝐴)={𝑥𝑛|𝐴𝑋=0} is said to be the nullspace of 𝐴.
  4. The set 𝑅(𝐴)={𝑏𝑛|𝐴𝑋=𝑏for some X in𝑛} is said to be the range of A.
    In general, column space of A = range of A.