Blog 4
Hour 7 & 8 - Subspaces & Matrix Multiplication
Hour 7
Hey everyone! Welcome to our blog once again! Today we will learn about the concepts of subspaces and matrix multiplication which are very crucial in linear algebra.
Subspace
A subspace of Rn is defined as a non-empty set of vectors in Rn that can be described as a span of vectors.
A subspace can basically be called a span because it also is taking all linear combinations of vectors.
A subspace of Rn is a subset V of Rn if it satisfies the following 3 criteria:
1) It must contain the 0 vector.
2) If vectors u and v are in V, their sum, u + v is also in V. (closed under addition)
3) If vector u is in V, then ku is also in V, for any scalar k. (closed under scalar multiplication)
Examples Where V Might Not Be A Subspace:
Closed Under Addition
In the example above, we can see that V is not a subspace because sum of 2 vectors in V didn’t belong to V. The sentence in red is a wrong statement.
Closed Under Scalar Multiplication
In the example above, we can see that V is not a subspace because the scalar multiplication of vector v with -2 didn’t belong to V. The sentence in red is a wrong statement.
Hour 8
Matrix Multiplication
We have seen how to add and subtract matrices together and for that both matrices have to have the same dimensions. Now, let us see how we can multiply matrices.
Matrix Notation
Two matrices can be multiplied together only when the first matrix has number of columns equal to the number of rows of the second matrix. For example, a m x n matrix will only be able to be multiplied to a matrix of dimensions n x b.
Column View
Here, every vector in the columns of matrix A, c1,c2,c3,…,cn is mapped and multiplied to each corresponding row x1, x2, x3,…,xn. The sum of x1c1, x2,c2,….,xncn is the result of multiplication of the matrices. Below is an example of this:
Dot Product
If u and v are two vectors with the same dimensions (same number of rows), then the dot product/scalar of u and v, u.v is the sum of the products of the corresponding entries of the two vectors, u and v. Note that the result is a scalar, not a vector!
Here’s an example below:
As you can see, the result of a dot product of 2 vectors will always be a scalar.
Row View
We saw column view multiplication before. Now, using dot product, matrices can be multiplied via the row view too.
Here are some examples:
Some helpful links:
Tutorial:
(1) https://www.youtube.com/watch?v=OMA2Mwo0aZg
That’s all for today guys! See you in the next blog :’)