Professional Documents
Culture Documents
Math Majorship Linear PDF
Math Majorship Linear PDF
Linear Systems
An n by n linear system of equations is a system of n linear equations in n variables.
a11x1 + a12x2 + ... + a1nxn = b1
a21x1 + a22x2 + ... + a2nxn = b2
... ... ... ...
an1x1 + an2x2 + ... + annxn = bn
Example
Solve
2x1 + 3x2 = 9
x1 - 2x2 = 1
Solution
To solve this we sequentially perform members of the following three operations:
1. Switch two equations.
2. Multiply an equation by a nonzero constant.
3. Replace an equation by that equation plus a multiple of the second equation.
We have
Switching the two equations
x1 - 2x2 = 1
2x1 + 3x2 = 9
Replace the 2nd equation with the 2nd equation + (-2)1st equation
x1 - 2x2 = 1
7x2 = 7
Multiply the second equation by 1/7
x1 - 2x2 = 1
x2 = 1
Replace the 1st equation with the 1st equation + (2)2nd equation
x1 = 3
x2 = 1
Matrices
An m by n matrix is an array of numbers with m rows and n columns.
Example
The matrix below is a 2 by 3 matrix.
A square matrix is an n by n matrix, that is a matrix such that the number of rows is equal to the number of
columns. The ijth entry is the number in the ith row andjth column. For example, the the matrix above the 1 2th entry
is
a12 = 4
Note: A vector such at <2,4,6> can be looked as a 1 by 3 matrix.
A square matrix is called a diagonal matrix if
aij = 0 for i j
The matrix below is a diagonal matrix
If all the entries of a diagonal matrix are equal, then the matrix is called a scalar matrix. The example below is a
scalar matrix.
Addition Subtraction and Scalar Multiplication
Just as with vectors we can add and subtract matrices and multiply a matrix by a scalar. To add or subtract
matrices the dimensions of the two matrices must be the same.
Definition
Let A and B be m by n matrices and k be a scalar then
(A + B)ij = Aij + Bij (A - B)ij = Aij - Bij (kA)ij = kAij
Example
Let
then
Two matrices are called equal if all of their entries are equal.
If A is an m by n matrix, then the transpose of A, AT, is the n by m matrix with the rows and columns switched.
(AT)ij = Aji
In the above example
Solution
We have
((AT)T )ij = (AT)ji = Aij
Since the ijth entries are equal for each ij, the matrices are equal.
Matrix Multiplication
Example
Find the dot product of
a = [2 1 0 6 -1] and b =
Solution
We have
.
a b = (2)(5) + (1)(2) + (0)(-3) + (6)(0) + (-1)(1) = 11
Matrix Multiplication
There are many ways of thinking about a matrix. One way is as a collection of row vectors and another way is as a
collection of column vectors. Consider the m byp matrix A (considered as a matrix of row vectors) and
the p by n matrix B (considered as a matrix of column vectors). The matrices are shown below.
Example
Let
Linear Systems
Any m by n linear system can be written in the form
Ax = b
Where A is the coefficient matrix,
xT = (x1 x2 ... xn)
and b is the m by 1 matrix of numbers to the left of the equality. For example the linear system
2x + 3y + z = 0
3x - 4y - z = 6
x + 2y + 3x = 2
can be written as
Properties of Addition
The basic properties of addition for real numbers also hold true for matrices.
Let A, B and C be m x n matrices
1. A + B = B + A commutative
2. A + (B + C) = (A + B) + C associative
3. There is a unique m x n matrix O with
4. A + O = A additive identity
5. For any m x n matrix A there is an m x n matrix B (called -A) with A + B = O additive inverse
The proofs are all similar. We will prove the first property.
Proof of Property 1
We have
(A + B)ij = Aij + Bij definition of addition of matrices
= Bij + Aij commutative property of addition for real numbers
= (B + A)ij definition of addition of matrices
Notice that the zero matrix is different for different m and n. For example
Im A = A I n = A multiplicative identity
We will often omit the subscript and write I for the identity matrix. The identity matrix is a square scalar matrix
with 1's along the diagonal. For example
We will prove the second property and leave the rest for you.
Proof of Property 2
Again we show that the general element of the left hand side is the same as the right hand side. We have
(A(B + C))ij = S(Aik(B + C)kj) definition of matrix multiplication
= S(Aik(Bkj + Ckj)) definition of matrix addition
= S(AikBkj + AikCkj) distributive property of the real numbers
= S AikBkj + S AikCkj commutative property of the real numbers
= (AB)ij + (AC)ij definition of matrix multiplication
where the sum is taken from 1 to k.
Example
We will demonstrate property 1 with
We have
so that
We have
so that
Definition
An m x n matrix is in reduced row echelon form if it satisfies the following properties:
1. All zero rows, if any, are at the bottom of the matrix
2. The first nonzero entry of each row is a one. This one is called the leading one or the corner.
3. Each corner is to the right and below the preceding corner.
4. The columns containing a leading one have zeros in all other entries.
If only 1, 2, and 3 are satisfied, then the matrix is in row echelon form.
Example
Of the following three matrices,
Theorem
Every m x n matrix is row equivalent to a unique matrix in rref.
Instead of proving this theorem, we will explain how to take a matrix and transform it into an rref matrix using only
the elementary row operations. We follow the following procedures:
1. Switch rows (if necessary) to ensure that the top left entry is nonzero. If the first column is all zero go to the
next one.
2. Make this top left entry a 1 by dividing the row by this entry.
3. Use this 1 and the third row operation to zero out the entries below and above (there aren't any above for
the first corner).
4. Repeat steps 1 through 3 for the columns to the right one at a time.
Example
Use the elementary row operations to put the following in rref.
Solution
We follow the procedures:
Homogeneous Systems
A homogeneous system of linear equation is a linear system of equations where the right hand sides of all the
equations are zero. That is it is of the form
a11x1 + a12x2 + ... + a1nxn = 0
a21x1 + a22x2 + ... + a2nxn = 0
... ... ...
a m1x1 + am2x2 + ... + amnxn = 0
Notice that in matrix form this can be written as
Ax = 0
where A is the m x n matrix with entries aij, x the the n x 1 matrix with entries xi and 0 is the n x 1 zero matrix. The
augmented matrix's last column is the zero column. Since the zero column is unaffected by elementary row
operations, it is usually left out when the computations are performed. The solution (0,0, ... , 0) is called
the trivial solution. Any other solution is called a nontrivial solution.
Theorem
Let
Ax = 0
be a homogeneous system with m x n matrix A. If m < n, then the system always has a nontrivial solution.
This theorem just states that if there are more variables than equations, then there is a nonzero solution.
Proof
Let B be the rref equivalent matrix to A. Then B has a column that does not contain a corner. This gives us a
parameter in the solution which we can set to 1, giving us a nontrivial solution. Since B has the same solution set
as A, A has this same nontrivial solution.
Inverse of a Matrix
Example
Consider the matrices
We can check that when we multiply A and B in either order we get the identity matrix. (Check this.)
Not all square matrices have inverses. If a matrix has an inverse, we call it nonsingular or invertible. Otherwise it is
called singular. We will see in the next section how to determine if a matrix is singular or nonsingular.
Properties of Inverses
Below are four properties of inverses.
1. If A is nonsingular, then so is A-1 and
(A-1) -1 = A
2. If A and B are nonsingular matrices, then AB is nonsingular and
(AB) -1 = B-1A-1
-1
3. If A is nonsingular then
(AT) -1 = (A -1)T
4. If A and B are matrices with
AB = In
Example
Find the inverse of the matrix
Solution
The inverse matrix is just the right hand side of the final augmented matrix
This example demonstrates that if A is row equivalent to the identity matrix then A is nonsingular.
We can use the inverse of a matrix to solve linear systems. Suppose that
Ax = b
Then just as we divide by a coefficient to isolate x, we can apply A-1 to both sides to isolate the x.
A-1Ax = A-1b
Ix = A-1b x = A-1b
Example
Solve
x + 4z = 2
x + y + 6z = 3
-3x - 10z = 4
Solution
We put this system in matrix form
Ax = b
with
The solution is
x = A-1 b
We have already computed the inverse. We arrive at
The solution is
x = -18 y = -9 z = 5
Determinants
Permutations
Before we can get to the definition of the determinant of a matrix, we first need to understand permutations.
Let
S = {1,2,...,n}
then a permutation is a 1-1 function from S to S.
We can think of a permutation on n elements as a reordering of the elements.
Example
(2,1,3) is a permutation on 3 elements. We have
f(1) = 2 f(2) = 1 f(3) = 3
The identity permutation is the permutation that keeps the elements in numerical order.
For example
e3 = (1,2,3)
We define a transposition of two elements the permutation that switches the elements.
For example (2,1,3) is a transposition that switches 1 and 2. We can compose two permutations since they are
functions. Given a permutation, how many transpositions does it take in order to get to the identity permutation? It
turns out that this is not a well defined question, since there are many ways of getting back to the identity. However
given any permutation, the parity of the number of transpositions to get back to the identity is independent of how it
is done.
A permutation is called even, if it takes an even number of transpositions to get back to the identity and odd of it
takes an odd number.
Example
(3,4,2,1) is an odd permutation since we can get back to the identity via
(3,4,2,1) --> (1,4,2,3) --> (1,2,4,3) --> (1,2,3,4)
where the sum is taken over all possible permutations on n elements and the sign is positive if the permutation is
even and negative if the permutation is odd.
Example
Find the det A where
Solution
We use all the permutations on 3 elements. The permutation (1,2,3) is even and corresponds with the product
a11a22a33 = (2)(3)(0) = 0
The permutation (1,3,2) is odd and corresponds with the product
-a11a23a32 = -(2)(5)(-1) = 10
Notice that the i subscripts are 1, 2, and 3 and the j subscripts are 1, 3, 2.
The permutation (2,1,3) is odd and corresponds with the product
-a12a21a33 = -(0)(1)(0) = 0
The permutation (2,3,1) is even and corresponds with the product
a12a23a31 = (0)(5)(10) = 0
The permutation (3,1,2) is even and corresponds with the product
a13a21a32 = (4)(1)(-1) = -4
The permutation (3,2,1) is odd and corresponds with the product
-a13a22a31 = -(4)(3)(10) = -120
Finally, we add these all up to get
0 + 10 + 0 + 0 - 4 - 120 = -114
Example
Find det A where
Solution
There are 24 permutations, however we only need those corresponding to products that are nonzero. Since the
last row has only one nonzero entry (third column), the last number in the permutation must be a 3. Also the first
column has only one nonzero entry, hence the one must be in the second entry. For the first number in the
permutation, we can only have a 4, since the first and second entries are zeros and 3 is already taken up by the
fourth number. That leaves only 2 for the third number since 1 and 3 correspond with zero entries and 3 is
reserved for the fourth number. Hence the only permutation that leaves us with a nonzero product is
(4,1,2,3)
This permutation is odd and corresponds with the product
-(3)(1)(5)(-2) = 30
Since all other permutations lead to a zero product, the determinant is 30.
Cofactors
Cofactors and Determinants
Definition
Let A be an n x n matrix and let Mij be the (n - 1) x (n - 1) matrix obtained by deleting the ith row and jth column.
Then det Mij is called the minor of aij. The cofactor Aij of aij is defined by
Aij = (-1)i+j det Mij
Example
Let
then
so the minor of a32 is the determinant of this 2 x 2 matrix. Since the matrix is triangular, the determinant is the
product of the diagonals or
(2)(4) = 8
The cofactor is
A23 = (-1)2+3(8) = -8
One of the main applications of cofactors is finding the determinant. The following theorem, which we will not
prove, shows us how to use cofactors to find a determinant.
Theorem
Let A be an n x n matrix and 1 < i < n. Then
det A = j (aijAij) = ai1Ai1 + ai2Ai2 + ... + ainAin
Example
Use cofactors to find det A for
Solution
We can use any row that we want. Let's pick the second row. We have
= 0 + (3)(0 - 5) + (8 - 0) = -7
Remark: Since det A = det AT, we can expand about a column if we desire.
Example
Find the determinant of
Solution
We can choose any row or column to expand. The third column has only one nonzero entry, so we select this
column. We have
Definition
Let A be an n x n matrix. Then the adjoint of A (adj A) is the matrix such that
(adj A)ij = Aji
Notice the switch of subscripts. This means that the adjoint is the transpose of the matrix that consists of cofactors.
Example
Find adj A for
Solution
We have
So that
Proof
The proof follows immediately from the formula for the determinant and the previous theorem. We have
[A(adj A)]ij = k aik(adj A)kj = k aikAjk = (det A)ij
where dij is the Kronecker delta function evaluating to 1 for i = j and 0 otherwise. Hence the theorem is proven.
The main application of this theorem is the following corollary that easily follows from the theorem.
Corollary
If A is a nonsingular matrix then
1
A-1 = adj A
det A
Example
We found that the matrix
has adjoint
This gives us a way to find inverses and a way to determine if a matrix is nonsingular.
For a 2 x 2 matrix the adjoint of A is easy to find. We have
Cramer's Rule
Let
Ax = b
be a linear system of equations with n x n matrix A. Then the solution is
det(Ai)
xi =
det(A)
where Ai is the matrix obtained from A by replacing the ith column of A by b.
Example
Use Cramer's rule to find z if
x - 3y + 2z = 3
2x + y + z = 1
x+y+z = 3
Solution
We write this in matrix form
We have
det A = 1(1 - 1) - (-3)(2 - 1) + 2(2 - 1) = 5
since we want to find z, we need det A3.
We find z by dividing
20
z = = 4
5