Nothing Special   »   [go: up one dir, main page]

Linear Algebra

Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

Linear Algebra

Linear Algebra
M. van der Weiden
Week 2

melanie.vanderweiden@Inholland.nl

14 september 2022

1 / 21
Linear Algebra
Recap

Given the matrices  


9 −1 3
A = −8 7 −6
−4 1 8
and  
1 1 1
B = 1 2 3
1 4 5
Calculate AB.

2 / 21
Linear Algebra
Answers recap

Answers:  
11 19 21
AB = −7 −18 −17
5 30 39

3 / 21
Linear Algebra
Subjects

Determinant
Guassian elimination
Solve systems with row operations

4 / 21
Linear Algebra
Determinants

The determinant (a scalar) can only be calculated for a square matrix.


The determinant is used to ascertaining whether an n × n linear system has a
solution. Also it can be used to calculate the inverse of a system.
It allows characterising some properties of the matrix and the linear mapping
represented by the matrix. The determinant is not only used in linear algebra
but also in calculus.
Notation: det(A) = |A|

5 / 21
Linear Algebra
Determinant 2 × 2
For a 2 × 2 matrix:  
a b
M=
c d

a b
det(M ) = = ad − bc
c d
or 
a11 a12
A= →
− |A| = a11 a22 − a12 a21
a21 a22
or
 
fxx fxy

− |F | = fxx fyy − fxy fyx
fyx fyy
(remember math 3)
6 / 21
Linear Algebra
Properties of determinants

A is n × n matrix and k scalar


Adding or subtracting a multiple of one row/column to another
row/column does not change the determinant
If 2 rows/columns of A are equal then det(A) = 0
Multiplying one row of A by k gives B: det(B) = k det(A)
det(kA) = k n det(A)
B is obtained by interchanging 2 rows or columns of A:
det(B) = − det(A)
det(A) det(B) = det(AB)
det(A) = det AT


7 / 21
Linear Algebra
Determinant

For n × n matrix use Gaussian elimination to simplify the matrix and then use
the minor cofactor method.
The road map to calculate the determinant is:
Choose a row/column to expand along (one with zeros is a good choice)
Determine the first element of the row/column
Determine the minors
Determine the place signs (chessboard/schaakbord)
Determine the cofactor of the different minors
Calculate the determinant of the matrix

8 / 21
Linear Algebra
Determinant
For a 3 × 3 matrix there are two different methods:
minor(scalar) times cofactor, don’t forget the chessboard:

a22 a23 a21 a23 a21 a22
|A| = a11 − a12
a31 a33 + a13 a31 a32

minor a32 a33 sign

cof actor

det(A) =
a11 a22 a33 + a12 a23 a31 + a13 a21 a32 − a31 a22 a13 − a32 a23 a11 − a33 a21 a12

9 / 21
Linear Algebra
Example Determinant 3 × 3

 
3 −1 6
Find the determinant of the matrix A = 9 −5 2
0 4 7

10 / 21
Linear Algebra
Exercises 1

Calculate the determinant of the matrix:


 
1 2 4
A = −1 0 3 
3 1 −2

11 / 21
Linear Algebra
Gaussian elimination

Gaussian elimination or row reduction is done to analyse any system of linear


equations and can be used on any matrix.
By means of Gaussian elimination the matrix is put into (reduced) echelon
form.
Operations that change the system but leave the solution unaltered are:
1 Change the order of the equations. (Switch rows)
2 Multiply or divide an equation/row by a non-zero constant.
3 Add or subtract a multiple of one equation/row to/from another
equation/row.
The symbol ∼ indicates that something is equivalent.

12 / 21
Linear Algebra
Example Gaussian elimination

 
0 3 −6 6 4 −5
3 −7 8 −5 8 9 
3 −9 12 −9 6 15
can be reduced in 8 steps to ∼
 
1 0 −2 3 6 0
0 1 −2 2 0 −7
0 0 0 0 1 4

13 / 21
Linear Algebra
Use of Gaussian elimination

A system of linear equations:

x1 − 2x2 = − 1
−x1 + 3x2 =3

The two line have a couple of options they can intersect, can be parallel or
can lie on top of each other. What does that mean for the amount of
solutions of the system?

14 / 21
Linear Algebra
Gaussian elimination

Lets solve the system, not using simultaneous equations, but Gauss
eliminations

x+y =3
3x − 2y = 4

15 / 21
Linear Algebra
Gaussian elimination

The augmented matrix:


     
1 1 3 1 1 3 1 1 3
−−−−−−−−→ −−−−−−−−→
3 −2 4 row2−3∗row1 0 −5 −5 row2∗(−1/5) 0 1 1
 
1 0 2
−−−−−−−→ →
− x = 2 and y = 1
row1−row2 0 1 1

16 / 21
Linear Algebra
Exercise 2

Solve the system using Gaussian elimination:

2x − 2y − 3z = 2
4x − y − z = −1
−x + 4y + 6z = 2

17 / 21
Linear Algebra

18 / 21
Linear Algebra
Course schedule week 2

19 / 21
Linear Algebra
Answer exercises 1

Only one method is shown here; both method yield the same result.


0 3 −1 3 −1 0
|A| = 1
− 2
+ 4
= 1(−3) − 2(−7) + 4(−1) = 7
1 −2 3 −2 3 1

20 / 21
Linear Algebra
Answer exercise 2

   
2 −2 −3 2 1 0 0 2
 4 −1 −1 −1 −−−−−−−−−−−−−−−→ 0 1 2 −7 
some row operations yield
−1 4 6 2 0 0 1 −16
 
2
The solution of the system is  25 
−16

21 / 21

You might also like