Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 37

Solutions to Systems of Linear Equations and

Matrix Algebra
Solutions to Systems of Linear Equations
and
Matrix Algebra
Systems of Linear Equations
• Example of a system of linear equations
–4

• Example of a system of nonlinear equations

3
Four Different Ways to Obtain Solutions to
Systems
• Solutions to linear equations can be obtained using
several different methods. We will eventually cover
four different approaches.
– Substitution
– Elimination
– Matrix
– Cramer’s

4
Substitution Technique - I

• Given
–4

• We can solve one of the equations for y. Using equation 3a


we have:

• We can insert equation 4b into equation 3b to obtain:


5
Substitution Technique - II
• Simplifying the result from prior slide gives

• Multiplying through by -2 and combining terms gives

• Which gives

• Inserting this result into either original equation gives

4 6
Gaussian Elimination
• Given
–4

• Multiplying equation 6b by gives


–4

• Adding equations 6c and 6d and simplifying gives

• Plugging y = -3 into either 6a or 6b gives the result that x = 2.


7
General Solution Using Gaussian Elimination
We can look to find a general solution using Gaussian elimination.
Given

• We can multiply 7b by to obtain the following set of equations

• Adding equations 7a and 7b gives:

8
General Solution Continued
• Using the result from the prior slide and solving for y gives

• Factoring out a -1 from the numerator and the denominator gives

• The result from equation 7e can be plugged into one of the original
equations to find x. After a bit of math we obtain

9
General Solution for a
System of Two Linear Equations
• Our general solutions are given by

• Notice that the denominator of x and y are the same!

• If ae – db = 0, then the two equations are either


– Parallel lines, which means there are no solutions
– Overlapping lines, which means there are a infinite number of
solutions.

10
Matrix Addition
• Two matrices must be the same size in order to add or subtract
them.

• Two matrices are of the same size if they have same number of
rows and columns.

• In this example, each Elements


matrix has
(1,1) three rows and two columns.

• To determine the (i,j)th entry, add (or subtract) the (i,j)th


element of each matrix.

Elements (3,2)
11
Matrix Subtraction

12
Example of Scalar Multiplication

13
Conformable
• A matrix is conformable if it’s dimensions are
suitable to perform an operation.

• For addition and subtraction, we learned that the


two matrices had to have the same dimensions.

• Given the matrices below, we learned that we


can’t add or subtract them.

14
Conformable Matrices: Multiplication
• The matrix product AB exists if and only if

Number of columns of A = number of rows of B.

• When the number of columns of A equals the number of rows of B,


the two matrices “conform” to the requirements for matrix
multiplication.

• The product AB conforms to the requirements for matrix


multiplication as there are 3 columns in A and 3 rows in B.

15
Matrix Multiplication: Order Matters

Define
A= B=

A*B = *

B*A = *

16
Example
• Find C = AB

17
Solution
• Given

2X2 2X3 3X2

Matrix dimensions: Notice that the dimensions of C are the number of rows in A
and the number of columns in B
18
Identity Matrix

[ ]
1 0 0
0 1 0
0 0 1

19
Identity Matrix Multiplication
• Provided the matrices can be multiplied
– AI = A
– IB = B

Also

20
Matrix Algebra Laws
• Associative
– (A + B) + C = A + (B + C)
– (AB)C = A(BC)

• Laws of Addition
–A+B=B+A

• Distributive
– A(B + C) = AB + AC
– (A + B)C = AC + BC

21
Transpose of a Matrix
• When you transpose a matrix, the first row becomes the
first column, the second row becomes the second
column, etc.

• Define

• Then the transpose of A, which is defined as A T, is given


by:
Linear Equations and Matrices
• A system of linear equations can be put into matrices.

• The above system can be put into a matrix equation given by

• To see that the matrix equation in 8c produces the equations in (8a)


and (8b), we can multiply the two matrices on the left side of equation
(8c).
Solutions to Systems of
Equations Using Matrices

• Define

• Then

• Thus, in order to find X, we need to find the inverse of A.


The Determinant of a 2X2 Matrix
• The determinant of a 2x2 matrix of coefficients can
be determined as follows:
The Determinant and
Solutions to Systems of Equations
• The value of the determinant is fundamentally connected to the solutions to a set
of linear equations. Given

• Solutions to the above system of equations are given by:

• The system of equations in 10a and 10b can be expressed as

• The determinant of the coefficient matrix is the denominator of our solutions. If


the determinant ≠ 0 then a solution exists.
Determinants for Larger Systems
• To find the determinant for systems of equations that
are larger than 2x2, several intermediate steps must
be performed.

• Steps
– Calculate minors
– Calculate cofactors
– Calculate the determinant

27
Minors
• Define the (i, j)th minor of A as

• Given

28
Example
• Find M13 for the matrix

29
Solution
• Given

30
Cofactors
• A cofactor is a signed minor.

• Two cases
– Cij = Mij, if the sum of the row and column is even.
– Cij = -1*Mij, if the sum of the row and column is odd.

• Example
– If M23 = 5, then C23 = -5 because 2 + 3 = 5 and 5 is an odd
number.
31
Determinant of 3x3 Matrix
• The determinant of a 3x3 matrix can be
calculated in 6 different ways!

Using a row

Using a column

32
Example
• Find the determinant.

33
Solution I
• When one of the elements in a coefficient matrix is a zero, it is
often helpful to use the column or row that corresponds to
the zero element to calculate the determinant.

34
Solution II

• The minors corresponding to the first row are given by:


– 4

35
Solution III
• The cofactors corresponding to the first row are given by:

36
Solution IV
• Given

• The value of the determinant is given by:

37

You might also like