Mathematics - Linear Algebra Vector Spaces

    Hello it's me again! Today we will continue with Linear Algebra getting into Vector Spaces and Subspaces. We will talk about a lot of basics today. In the next post we will get into more interesting stuff. :) So, without further do let's get started!

Linear Vector Space:

    Vector spaces are the generalization of the classic 2d and 3d vectors that most off you may already know from math in school. So, the 2d and 3d vectors are also vector spaces. We are talking about a definition field of R^n, cause each "dimension" is in the real number set R and so if we have n numbers we have a R set for each.

We define a vector space like that:

R^n = { (x1, x2, ..., xn): xi is in R and i = 1, 2, ..., n }

where n is the number of dimensions, xi is the variable/value for each dimension and i is representing each dimension.

     To make it more clear for you in 3-dimensional vector spaces we commonly use the names x, y and z for the variables and so this vector space looks like this:

R^3 = { (x, y, z): x, y, z are in R}

So, we can have for example (π, 1.52, 7) be a vector inside of this space.

After 3-dimensions we use xi simply instead of using more letters.

Basic Vector Operations:

For all the vector spaces we specify an addition and an scalar multiplication


    If we have 2 vectors v1 = (x1, x2, ..., xn) and v2 = (y1, y2, ... , yn) inside of the same R^n vector space the addition looks like this:

v1 + v2 = (x1, x2, ..., xn) + (y1, y2, ..., yn) = (x1 + y1, x2 + y2, ..., xn + yn)

So, we simply add the corresponding dimension values.

Scalar Multiplication:

    If we have a vector v = (x1, x2, ..., xn) and an constant k inside of R then scalar multiplication looks like this:

k*v = k * (x1, x2, ..., xn) = (k*x1, k*x2, ..., k*xn)

So, we simply multiply each dimension value with the constant.


  • v + w = w + v (commutative property)
  • (u + v) + w = u + (v + w)  (associative property of addition)
  • 0 + v = v = v + 0 (we have a 0-vector that is the neutral element of addition)
  • v + (-v) = 0 (we have a opposite -v for each vector)
  • 1*v = v (1 is the neutral element of multiplication)
  • k (v + w) = kv + kw (distributive vector property)
  • (k + l) v = kv + lv (distributive scalar property)
  • (k l) v = k(lv) (associative property of multiplication)

where v, w, u are vectors and k, l are constants.

    Adding those 2 operations we actually created a relation or function between 2 vector spaces, also called linear function, but I will get into that stuff some posts later on.

Matrix Space:

    All those operations and properties apply to the matrix space as well. And so matrixes have also an addition and a scalar multiplication operation.

So, having A(aij) and B(bij) be m*n matrixes we have:

  • A + B = (aij) + (bij) = (aij + bij)
  • kA = k(aij) = (k*aij)

    Those 2 are actually the addition and scalar multiplication we already talked about posts before, but I wanted to point it out here so that you get a better understanding of what an vector space is. You can see that a matrix is also a vector space!

Other vector spaces:

    Vector spaces are also Sets, Polynomials and even Sequences. But, you might now wonder, well if everything is an vector space then what's the point of having them? Let me first point out that not everything is an vector space. A space is a vector space only if it follows the properties I told you before. So, we might have a space (mostly subspace that we will get in a sec) that may look like it follows the properties and operations, but the result of addition or multiplication doesn't belong to it's space or definition field.

     What I mean by that is that we will always have to prove that the addition and scalar multiplication give us a result that is what we expected it to be by following the main definitions we talked about today.

These properties are used to define if a space is a vector space:

  • (k - l)v = kv - lv (k, l in R and v vector of vector space V)
  • 0*v = 0 (v vector of vector space V, this is very important property that will help us later on, cause if a given subspace doesn't contain the 0-vector we know that it's actually not a subspace)
  • k*0 = 0 (where k is a constant and so a 0-vector multiplied with any constant gives itself)
  • -1*v = -v (where v is a vector of vector space V and -1 is the opposite)

Linear Subspace:

    A subspace contains a part of a vector space, as you might already thought of. So, when having a vector space V and W (both not empty) and W is a subspace of V then:

  • zero-vector 0 is part of W (cause i'ts also part of V)
  • the sum u + v of 2 vectors u, v of W is also a vector of W
  • the scalar multiplication of a vector u of W with a constant k of R is also a vector of W

    So, we will always first check if a subspace contains the 0-vector and then try out the addition and scalar multiplication operations to see if they give us an vector that is also a part of this subspace.

Let's get into 2 examples so that you understand what we have to do.

Example 1:

     Suppose we have the R^4 vector space and a space/set W = { (s, 0, t, 2s - 3t): s, t in R}. We will proof that this space is not a set, but an subspace.

First of all, when s = t = 0 we have (s, 0, t, 2s - 3t) = (0, 0, 0, 0) and so the 0-vector is part of W.

Now into addition. Let's use (s, 0, t, 2s - 3t) and (s', 0, t', 2s' - 3t') as vectors of W.

(s, 0, t, 2s - 3t) + (s', 0, t', 2s' - 3t') = (s + s', 0, t + t', 2(s + s') - 3(t + t')) that is a vector of W.

For multiplication let's use a constant k of R and vector (s, 0, t, 2s - 3t).

k*(s, 0, t, 2s - 3t) = (k*s, 0, k*t, 2ks - 3kt) that is also a vector of W.

So, we proofed that W is a subset of R^4.

Example 2:

    Suppose we have the R^3 vector space and a space/set P = { (x, y, z): x + 2y - 3z = -1}. We will proof that this set is not a subspace of R^3.

    We actually just have to say that the line x + 2y - 3z = -1 doesn't go through the center point (0, 0, 0) and so this set doesn't contain the 0-vector and so can't be a subspace of R^3.

    So, whenever we see a line of kx + ly + mz = c != 0 then we know that this is not a subspace. In the same way if it's equal to 0 it is a subspace!

Nullspace and Range:

Let's get back to the matrix space.

Suppose A that is a mxn matrix that is a vector space of R^n then we have

N(A) = {X in R^n: AX = 0}

where N(A) is an subspace of R^n.

    We call this set the nullspace of A and this space contains the solutions of the linear system A represents if this system was homogeneous.

Another important set is the so called range of A.

R(A) = {b in R^m: AX = b for some X in R^n}

    R(A) is a subspace of R^m and contains the constant column of the linear system that matrix A represents.


    Let's get the set W = { (s, 0, t, 2s - 3t):s, t in R } again. This set is a subspace of R^4 as we already proofed before. Let's also suppose a matrix A where R(A) = W. So, W is the range of A.

Let's try to find out A.

R(A) = {b in R^4: AX = b for  X = [s t]^T (transpose) in R^2}

    If we think about matrix multiplication and having X be 2x1 (because of s, t) and knowing that b is 4x1 we know that A must be 4x2, cause 4x2 * 2x1 = 4x1. (that 2's get "eliminated")

That way we now have that:

A * [s t]^T = [s 0 t 2s-3t] ^T

S0, the rows of A (suppose they have a, b values) are:

1 0, cause a*s + b*t = s and so a = 1 and b = 0

0 0, cause a*s + b*t = 0

0 1, cause a*s + b*t = t and so a = 0 and b = 1

2 -3, cause a*s + b*t = 2s - 3t and so a = 2 and b = -3

That way we now know that A is the following matrix:

Purrfect artwork :P

I hope that I got you into the vector space world in a way that helped you understand it.

This is actually it for today and I hope you enjoyed it!


3 columns
2 columns
1 column
Join the conversation now