21b Midterm 1 Handout
21b Midterm 1 Handout
21b Midterm 1 Handout
3
2
1
2
1 3s
1
3
This gives the solution x1 = 1 3x3 and x2 = 2x3 + 2, written as 2s + 2 or 2 + s 2
s
0
1
2. Matrix-Vector Multiplication
Matrix multiplication involves taking the dot product of each of the rows of the matrix with the vector by which
you are mulitplying.
For example:
1
3
3
2
9
0
4
1
33
6 2 = 63
4
7
31
In order to multiply a vector by a matrix, the number of columns of the matrix must equal the number of rows
of the vector. That is, for a vector ~x Rn , it can only be multiplied by an m n matrix, giving a solution in the
form of a vector ~b Rm .
For example:
1
3
2
8
2
2
4
= 18
3
19
5
Order matters when multiplying matrices and vectors. Thus, there is no commutative property for vector multiplication. That is in general, AB(~x) 6= BA(~x) for two distinct matrices A and B.
3. Linear Transformations
Linear Transformations are functions that take a vector ~x in Rm and create another vector ~b in Rn . Note that m
and n can be the same number, but that n m.
A linear transformation can be used to scale, rotate, reflect, and project vectors onto one another.
A transformation from Rm Rn is linear only if it is closed under scalar multiplication and addition, i.e.
T (~x + ~y ) = T (~x) + T (~y ) and T (k~x) = kT (~x) ~x, ~y Rm .
A linear transformation is a linear combination of different vectors, and any transformation T (~x) = ~b can be
represented by a matrix A, such that A~x = ~b.
Examples:
Projection onto the x-axis
1
0
0
0
0
1
1
0
Scaling by a factor of 2
2
0
0
2
Transformations can occur in many dimensions. The find the matrix of a transformation, the easiest way is to
find T (e~1 ), T (e~2 ), ..., T (e~n ), which give the columns, in order, of the matrix A of the transformation
4. Vector Spaces and Subspaces
1
A vector space is a collection of vectors that span a certain space, such as R3 , which is three-dimensional space
A basis of Rn is a set of n vectors that spans all of Rn . For instance e~1 , e~2 , , e~n span Rn .
A subspace of V Rn a set of vectors that span V that are closed under scalar multiplication and addition
The dimension of a subspace, written dim(V) = k, is the number of vectors that span the subspace, i.e. dim(R2 = 2
Another way of saying it: ~b V, there is a combination of v~1 , v~2 , ..., v~n such that ~b = c1 v~1 + c2 v~2 + ... + cn v~n ,
c1 ...cn R
If the vectors v~1 ...v~n are linearly independent, then that combination of scalars c1 , ..., cn is unique. The existence
of a unique combination ~b V implies that V is a subspace of Rn
The kernel and the image of a matrix are also subspaces. The kernel contains all vectors ~x such that A~x = ~0,
while the image is the span of the columns of the matrix, which corresponds to the span of its codomain.
For example, given the following matrix:
1
1
1
3
3
3
4
2
3
1
4
1
The vector spanning the kernel is 3 and the vectors spanning the image are 1 , 2
0
1
3
Notice that the matrix above is the same as projecting onto the x-axis in the standard basis.
If we want to find the matrix of the transformation with respect to the standard basis, we can use the formula:
A = S 1 BS, where S is a matrix with columns corresponding to the vectors of the new basis we are using.
We can build the matrix B column-by-column using the fact that the columns of B are just [T (v~1 )T (v~2 )...T (v~n )],
where v~1 ... v~n are the new basis vectors