Professional Documents
Culture Documents
De…nition 51 (row and column vectors) Vectors are special forms of ma-
trices.
1. A row vector is a vector which has only one row. In other words, it is an
1 n matrix.
2. A column vector is a vector which has only one column. In other words,
it is an m 1 matrix.
Example 52 Here are some matrices
2 3
1 2
1. 4 5 2:5 5 is a 3 2 matrix.
0 1
2 3
1 2 3
2. 4 3 p5 9 5 is a square (3 3) matrix.
2 0
2 3
1 0 0
3. 4 0 1 0 5is the 3 3 identity matrix.
0 0 1
2 3
1 3 5 4
6 0 2 6 4 7
4. 6 7
4 0 0 2 1 5 is a 4 4 upper triangular matrix.
0 0 0 5
2 3
1
6 2 7
5. 6 7
4 3 5 is a column vector. It is also a 4 1 matrix.
10
6. 5 0 2 is a row vector. It is also a 1 3 matrix.
In the case of a vector, there is no need to use double subscripts. For example,
instead of writing A = a11 a12 a13 a14 , we write A = a1 a2 a3 a4 .
In the special case that m = n = 1, the matrix is a 1 1 matrix and may be
written A = [a11 ] = [a] = a. In other words, subscripts are not needed. Since
the matrix only has one entry, it is the same as a number (also called a scalar).
To add (subtract) two matrices having the same size, simply add (sub-
tract) the corresponding entries. In other words, if C = A + B, then
cij = aij + bij . Same for subtraction.
Scalar Multiplication
This is multiplication of a matrix by a number.
AB = a1 b1 + a2 b2 + :::an bn
Xn
= ai bi
i=1
Matrix Multiplication
Let us assume that A is m p and B is q n.
Matrix multiplication is a little bit more complicated than the other oper-
ations. We explain it by showing how each entry of the resulting matrix is
obtained. Let us assume that A = [aij ] is m p and B = [bij ] is p n. Let
C = [cij ] = AB. Then, C is a m n matrix. cij is obtained by multiplying
the ith row of A by the j th column of B. In other words,
p
X
cij = aik bkj , i = 1; 2; :::; m, j = 1; 2; :::; n
k=1
24 CHAPTER 1. SYSTEMS OF LINEAR EQUATIONS AND MATRICES
Remark 56 Because of the condition on the sizes of the matrices, one can see
easily that matrix multiplication will not be commutative. For example, if A is
3 4 and B is 4 5 then one can compute AB. Its size will be 3 5. However,
BA cannot be computed. Even in cases when both AB and BA can be computed,
they are unlikely to be the same. For example
2 32 3 2 3
1 2 3 1 1 1 14 14 14
4 2 3 4 5 4 2 2 2 5 = 4 20 20 20 5
3 4 5 3 3 3 26 26 26
but 2 32 3 2 3
1 1 1 1 2 3 6 9 12
4 2 2 2 54 2 3 4 5 = 4 12 18 24 5
3 3 3 3 4 5 18 27 36
Example 59
2 3T 2 3
1 2 3 1 4 7
4 4 5 6 5 =4 2 5 8 5
7 8 9 3 6 9
Example 60
2 3T 2 3
a11 a12 a13 a11 a21 a31
4 a21 a22 a23 5 = 4 a12 a22 a32 5
a31 a32 a33 a13 a23 a33
Example 61
2 3T
1
4 3 5 = 1 3 5
5
We are simply switching the rows and the columns. If A = [aij ] then AT =
[aji ]. Note that in this process, the elements on the main diagonal remain
unchanged.
1 2
Example 63 if A = then tr (A) = 8.
4 7
2 3
a11 a12 a13
Example 64 If A = 4 a21 a22 a23 5, then tr (A) = a11 + a22 + a33 .
a31 a32 a33
1.3.4 Problems
Do numbers 1 - 5, 12 - 14, 19 - 23, 25 on pages 34-37