Linear
Algebra 2015
Introduction
What is Linear Algebra about?
Linear Algebra is a branch of mathematics which emerged years back and was one of the pioneer branches of
mathematics Though, initially it started with solving of the simple linear equation ax + b = 0, but later on it
diversified due its vivid application in various fields The basic idea behind finding the solution of a system of
linear equations is by elimination of variables
The main reason behind the popularity of algebraic mathematics is following generic solution which most of
the problems follow. E.g. start from a problem in geometry, translate the problem in the language of algebra,
solve the resulting algebra problem using the algebraic tools and finally transport the solution back to
geometry.
History
Matrix, a set of numbers arranged in rows and columns so as to form a rectangular array. The numbers are
called the elements, or entries, of the matrix. Matrices have wide applications in engineering, physics,
economics, and statistics as well as in various branches of mathematics. Historically, it was not the matrix but
a certain number associated with a square array of numbers called the determinant that was first recognized.
Only gradually did the idea of the matrix as an algebraic entity emerge. That such an arrangement could be
taken as an autonomous mathematical object, subject to special rules that allow for manipulation like ordinary
numbers, was first conceived in the 1850s by Cayley and his good friend the attorney and
mathematician James Joseph Sylvester.
Linear Algebra 2015
What do you learn here?
Key Terms:
1.
Matrix
2.
Vector
3.
Submatrix
4.
Square matrix
5.
Equal matrices
6.
Zero matrix
7.
Identity matrix
8.
Diagonal matrix
9.
Upper triangular matrix
10. Lower triangular matrix
11. Tri-diagonal matrix
12. Diagonally dominant matrix
13. Addition of matrices
14. Subtraction of matrices
15. Multiplication of matrices
16. Scalar Product of matrices
17. Linear Combination
18. Rules of Binary Matrix Operation
19. Transpose
20. Symmetric Matrix
21. Skew-Symmetric Matrix
22. Trace of Matrix
23. Determinant
24. Consistent system
25. Inconsistent
26. Infinite solutions
27. Unique solution
28. Rank
29. Inverse
30. Eigenvalue
31. Eigenvectors
32. Power method
Linear Algebra 2015
What does a matrix look like?
Matrices are everywhere. Look at the matrix below about the sale of jeans in a Departmental Store given by
quarter and make of jeans.
Levis
Newport
Pepe
Q1
Q2
Q3
25
5
20
10
16
15
7
Q4
2
25
27
If one wants to know how many Pepe jeans were sold in Quarter 4, we go along the row Pepe and column Q4
and find that it is 27.
So what is a matrix?
A matrix is a rectangular array of elements. The elements can be symbolic expressions or numbers. Matrix
[A] is denoted by
a11
a
[ A] 21
a m1
a12
a 22
am2
....... a1n
....... a 2 n
....... a mn
Row i of [ A] has n elements and is
ai1
ai 2 ....ain
and column j of [ A] has m elements and is
a1 j
a
2j
a mj
Each matrix has rows and columns and this defines the size of the matrix. If a matrix [A] has m rows and
n columns, the size of the matrix is denoted by m n . The matrix [ A] may also be denoted by [ A] mn to
show that [ A] is a matrix with m rows and n columns.
Each entry in the matrix is called the entry or element of the matrix and is denoted by a ij where i is the row
number and j is the column number of the element.
The matrix for the jeans sales example could be denoted by the matrix [A] as
Linear Algebra 2015
25 20 3 2
[ A] 5 10 15 25 .
6 16 7 27
There are 3 rows and 4 columns, so the size of the matrix is
3 4 . In the above [ A] matrix, a34 27 .
What are the special types of matrices?
Vector: A vector is a matrix that has only one row or one column. There are two types of vectors row
vectors and column vectors.
Row Vector:
If a matrix [ B] has one row, it is called a row vector
[ B] [b1 b2 bn ] and n is the dimension of the
row vector.
Example
Give an example of a row vector.
Solution
[ B ] [25 20 3 2 0]
is an example of a row vector of dimension 5.
Column vector:
If a matrix [C ] has one column, it is called a column vector
c1
[C ]
c m
and m is the dimension of the vector.
Example
Give an example of a column vector.
Solution
25
[C ] 5
6
is an example of a column vector of dimension 3.
Submatrix:
If some row(s) or/and column(s) of a matrix [ A] are deleted (no rows or columns may be deleted), the
remaining matrix is called a submatrix of [ A] .
Example
Find some of the submatrices of the matrix
Linear Algebra 2015
4 6 2
[ A]
3 1 2
Solution
2
4 6 2 4 6
3 1 2, 3 1, 4 6 2, 4, 2
are some of the submatrices of [ A] . Can you find other submatrices of [ A] ?
Square matrix:
If the number of rows m of a matrix is equal to the number of columns n of a matrix [ A] , ( m n ), then
[ A] is called a square matrix. The entries a11 , a22 ,..., ann are called the diagonal elements of a square
matrix. Sometimes the diagonal of the matrix is also called the principal or main of the matrix.
Example
Give an example of a square matrix.
Solution
25 20 3
[ A] 5 10 15
6 15 7
is a square matrix as it has the same number of rows and columns, that is, 3. The diagonal elements of [ A]
are
a11 25, a 22 10, a33 7 .
Upper triangular matrix:
A m n matrix for which a ij 0, i j is called an upper triangular matrix. That is, all the elements
below the diagonal entries are zero.
Example
Give an example of an upper triangular matrix.
Solution
7
0
10
[ A] 0 0.001
6
0
0
15005
is an upper triangular matrix.
Lower triangular matrix:
A m n matrix for which a ij 0, j i is called a lower triangular matrix. That is, all the elements above
the diagonal entries are zero.
Linear Algebra 2015
Example
Give an example of a lower triangular matrix.
Solution
0 0
1
[ A] 0.3 1 0
0.6 2.5 1
is a lower triangular matrix.
Diagonal matrix:
A square matrix with all non-diagonal elements equal to zero is called a diagonal matrix, that is, only the
diagonal entries of the square matrix can be non-zero, ( a ij 0, i j ).
Example
Give examples of a diagonal matrix.
Solution
3 0 0
[ A] 0 2.1 0
0 0 0
is a diagonal matrix.
Any or all the diagonal entries of a diagonal matrix can be zero. For example
3 0 0
[ A] 0 2.1 0
0 0 0
is also a diagonal matrix.
Identity matrix:
A diagonal matrix with all diagonal elements equal to one is called an identity matrix, ( a ij 0, i j and
aii 1 for all i ).
Example
Give an example of an identity matrix.
Solution
1
0
[ A]
0
0 0 0
1 0 0
0 1 0
0 0 1
is an identity matrix.
Linear Algebra 2015
Zero matrix:
A matrix whose all entries are zero is called a zero matrix, ( aij 0 for all i and j ).
Example
Give examples of a zero matrix.
Solution
0 0 0
[ A] 0 0 0
0 0 0
0 0 0
[B]
0 0 0
0 0 0 0
[C ] 0 0 0 0
0 0 0 0
[ D] 0 0 0
are all examples of a zero matrix.
Tridiagonal matrices:
A tridiagonal matrix is a square matrix in which all elements not on the following are zero - the major
diagonal, the diagonal above the major diagonal, and the diagonal below the major diagonal.
Example
Give an example of a tridiagonal matrix.
Solution
2
2
[ A]
0
4 0 0
3 9 0
0 5 2
0 3 6
is a tridiagonal matrix.
Do nonsquare matrices have diagonal entries?
Yes, for a m n matrix [ A] , the diagonal entries are a11 , a 22 ..., a k 1, k 1 , a kk where k min{m, n} .
Example
What are the diagonal entries of
Linear Algebra 2015
3.2 5
6
7
[ A]
2.9 3.2
5.6 7.8
Solution
The diagonal elements of [ A] are
a11 3.2 and a 22 7.
Diagonally Dominant Matrix:
A n n square matrix [ A] is a diagonally dominant matrix if
n
a ii | a ij | for all i 1,2,....., n and
j 1
i j
aii | aij | for at least one i ,
j 1
i j
that is, for each row, the absolute value of the diagonal element is greater than or equal to the sum of the
absolute values of the rest of the elements of that row, and that the inequality is strictly greater than for at least
one row. Diagonally dominant matrices are important in ensuring convergence in iterative schemes of solving
simultaneous linear equations.
Example
Give examples of diagonally dominant matrices and not diagonally dominant matrices.
Solution
7
15 6
[ A] 2 4 2
3
2
6
is a diagonally dominant matrix as
a11 15 15 a12 a13 6 7 13
a 22 4 4 a 21 a 23 2 2 4
a33 6 6 a31 a32 3 2 5
and for at least one row, that is Rows 1 and 3 in this case, the inequality is a strictly greater than inequality.
Linear Algebra 2015
9
15 6
4
[ B] 2
2
3 2 5.001
is a diagonally dominant matrix as
b11 15 15 b12 b13 6 9 15
b22 4 4 b21 b23 2 2 4
b33 5.001 5.001 b31 b32 3 2 5
The inequalities are satisfied for all rows and it is satisfied strictly greater than for at least one row (in this
case it is Row 3).
25 5 1
C 64 8 1
144 12 1
is not diagonally dominant as
c 22 8 8 c 21 c 23 64 1 65
When are two matrices considered to be equal?
Two matrices [A] and [B] are equal if the size of [A] and [B] is the same (number of rows and columns are
same for [A] and [B]) and aij = bij for all i and j.
Example
What would make
2 3
[A]
6 7
to be equal to
3
b
[ B] 11
6 b22
Solution
The two matrices [ A] and [B] could be equal if
b11 2 and b22 7 .
How do you add two matrices?
How do you add
Two matrices [ A] and [B ] can be added only if they are the same size. The addition is then shown as
[C ] [ A] [ B ]
where
Linear Algebra 2015
cij aij bij
Example
Add the following two matrices.
5 2 3
[ A]
1 2 7
6 7 2
[ B]
3 5 19
Solution
[C ] [ A] [ B ]
5 2 3 6 7 2
1 2 7 3 5 19
5 6 2 7 3 2
1 3 2 5 7 19
11 9 1
4 7 26
Example
ABC Departmental Store has two store locations
A and B , and their sales of jeans are given by make (in
rows) and quarters (in columns) as shown below.
25 20 3 2
[ A] 5 10 15 25
6 16 7 27
20 5 4 0
[B] 3 6 15 21
4 1 7 20
where the rows represent the sale of Levis, Newport and Pepe jeans respectively and the columns represent
the quarter number: 1, 2, 3 and 4. What are the total jeans sales for the two locations by make and quarter?
Solution
[C ] [ A] [ B ]
25 20 3 2 20 5 4 0
= 5 10 15 25 + 3 6 15 21
6 16 7 27 4 1 7 20
25 20
= 5 3
6 4
20 5 3 4 2 0
10 6 15 15 25 21
16 1 7 7 27 20
Linear Algebra 2015
45 25 7 2
8 16 30 46
10 17 14 47
So if one wants to know the total number of Pepe jeans sold in quarter 4 at the two locations, we would look
at Row 3 Column 4 to give
c34 47.
How do you subtract two matrices?
Two matrices [ A] and [B ] can be subtracted only if they are the same size. The subtraction is then given
by
[ D ] [ A] [ B ]
Where
d ij aij bij
Example
Subtract matrix [B ] from matrix [ A] .
5 2 3
[ A]
1 2 7
6 7 2
[B ]
3 5 19
Solution
[ D ] [ A] [ B ]
5 2 3 6 7 2
1 2 7 3 5 19
(5 6) (2 7) (3 (2))
(1 3) (2 5) (7 19)
1 5 5
2 3 12
Example
ABC Departmental Store has two store locations
rows) and quarters (in columns) as shown below.
25 20 3 2
[ A] 5 10 15 25
6 16 7 27
A and B and their sales of jeans are given by make (in
Linear Algebra 2015
20 5 4 0
[B] 3 6 15 21
4 1 7 20
where the rows represent the sale of Levis, Newport and Pepe jeans respectively and the columns represent
the quarter number: 1, 2, 3, and 4. How many more jeans did store
A sell than store B of each brand in
each quarter?
Solution
[ D ] [ A] [ B ]
25 20 3 2 20 5 4 0
= 5 10 15 25 3 6 15 21
6 16 7 27 4 1 7 20
20
25 20 20 5 3 4
5 3 10 6 15 15 25 21
6 4 16 1 7 7 27 20
5 15 1 2
2 4 0 4
2 15 0 7
So if you want to know how many more Pepe jeans were sold in quarter 4 in store
A than store B ,
d 34 7 . Note that d13 1 implies that store A sold 1 less Newport jeans than store B in quarter 3.
How do I multiply two matrices?
Two matrices [ A] and [B ] can be multiplied only if the number of columns of [ A] is equal to the number
of rows of [B ] to give
[C ] mn [ A] m p [ B] pn
If [ A] is a
m p matrix and [B ] is a p n matrix, the resulting matrix [C ] is a m n matrix.
So how does one calculate the elements of [C ] matrix?
p
cij aik bkj
k 1
ai1b1 j ai 2 b2 j aip b pj
for each i 1, 2, , m and j 1, 2, , n .
Linear Algebra 2015
To put it in simpler terms, the i
by multiplying the i
th
th
row and
row of [ A] by the
j th column of the [C ] matrix in [C ] [ A][ B ] is calculated
j th column of [B ] , that is,
b1 j
b
2j
cij ai1 ai 2 aip
b pj
ai1 b1j ai2 b2j ........ aip b pj .
aik bkj
k 1
Example
Given
5 2 3
[ A]
1 2 7
3 2
[ B] 5 8
9 10
Find
C AB
Solution
c12 can be found by multiplying the first row of [ A] by the second column of [B ] ,
2
c12 5 2 3 8
10
(5)( 2) ( 2)( 8) (3)( 10)
56
Similarly, one can find the other elements of [C ] to give
52 56
[C ]
76 88
Example
ABC Departmental Store location A and the sales of jeans are given by make (in rows) and quarters (in
columns) as shown below
Linear Algebra 2015
25 20 3 2
[ A] 5 10 15 25
6 16 7 27
where the rows represent the sale of Levis, Newport and Pepe jeans respectively and the columns represent
the quarter number: 1, 2, 3, and 4. Find the per quarter sales of store
A if the following are the prices of
each jeans.
Levis = $33.25
Newport = $40.19
Pepe = $25.03
Solution
The answer is given by multiplying the price matrix by the quantity of sales of store
33.25
A . The price matrix is
40.19 25.03 , so the per quarter sales of store A would be given by
25 20 3 2
[C ] 33.25 40.19 25.03 5 10 15 25
6 16 7 27
3
cij aik bkj
k 1
3
c11 a1k bk1
k 1
a11b11 a12b21 a13b31
33.2525 40.19 5 25.036
$1182 .38
Similarly
c12 $1467.38
c13 $877.81
c14 $1747.06
Therefore, each quarter sales of store
C 1182.38
A in dollars is given by the four columns of the row vector
1467.38 877.81 1747.06
Remember since we are multiplying a 1 3 matrix by a 3 4 matrix, the resulting matrix is a 1 4 matrix.
What is the scalar product of a constant and a matrix?
If [ A] is a
n n matrix and k is a real number, then the scalar product of k and [ A] is another n n
matrix [ B ] , where bij k aij .
Linear Algebra 2015
Example
Let
2.1 3 2
[ A]
5 1 6
Find 2[ A]
Solution
2.1 3 2
2[ A] 2
5 1 6
2 2.1 2 3 2 2
2 5 2 1 2 6
4.2 6 4
10 2 12
What is a linear combination of matrices?
If [ A1 ],[ A2 ],.....,[ Ap ] are matrices of the same size and k1 , k 2 ,.....,k p are scalars, then
k1[ A1 ] k2 [ A2 ] ........ k p [ Ap ]
is called a linear combination of [A1 ], [ A2 ],....., [ A p ]
Example
0 2.2 2
5 6 2
2.1 3 2
, [ A2 ]
, [ A3 ]
then find [ A1 ] 2[ A2 ] 0.5[ A3 ]
3 3.5 6
3 2 1
5 1 6
If [ A1 ]
Solution
[ A1 ] 2[ A2 ] 0.5[ A3 ]
5 6 2
2.1 3 2
0 2.2 2
2
0.5
3 2 1
5 1 6
3 3.5 6
5 6 2 4.2 6 4 0 1.1 1
3 2 1 10 2 12 1.5 1.75 3
9.2 10.9 5
11.5 2.25 10
What are some of the rules of binary matrix operations?
Commutative law of addition
If [ A] and [B ] are
m n matrices, then
[ A] [ B ] [ B ] [ A] ]
Associative law of addition
Linear Algebra 2015
If [A], [B] and [C] are all
m n matrices, then
[ A] [ B] [C ] [ A] [ B ] [C ]
Associative law of multiplication
If [ A] , [B ] and [C ] are m n, n p and p r size matrices, respectively, then
[ A][ B][C ] [ A][ B][C ]
and the resulting matrix size on both sides of the equation is
m r.
Distributive law
If [ A] and [B ] are
m n size matrices, and [C ] and [D ] are n p size matrices
[ A][C ] [ D] [ A][C ] [ A][ D]
[ A] [ B][C ] [ A][C ] [ B][C ]
and the resulting matrix size on both sides of the equation is
m p.
Example
Illustrate the associative law of multiplication of matrices using
1 2
2 5
2 1
[ A] 3 5, [ B]
, [C ]
9 6
3 5
0 2
Solution
[ B ][C ]
2 5 2 1
9 6 3 5
19 27
36 39
1 2
19 27
[ A]([ B][C ]) 3 5
36 39
0 2
91 105
237 276
72 78
1 2
2 5
[ A][ B ] 3 5
9 6
0 2