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

Linear Algebra

Linear Algebra
M. van der Weiden
Week 1

melanie.vanderweiden@Inholland.nl

7 september 2022

1 / 31
Linear Algebra
Learning material

Mathematics for Engineers, Croft & Davidson


Reader on Moodle
For the exam only an non-programmable calculator can be used: TI-30 or
Casio FX-82.

2 / 31
Linear Algebra
Subjects of this course
Introduction to matrices
Matrix operations
Vector multiplication
Gaussian elimination
Determinants
Inverse matrix and its properties
Singular and non-singular matrices
Solving system of simultaneous equations
Rank
Eigenvalues and eigenvectors
Linear transformations:
Reflection matrix
Rotation matrix
3 / 31
Linear Algebra
Why linear algebra?

To understand the basic procedures and choose which calculation to perform.


The concepts are as important as the computation. Linear algebra and linear
systems are used in the following fields of engineering:
robotics: path planning
aviation: monitoring the location of an aircraft or scheduling flight crew
mechanical systems: damper system on a car
electrical systems: automatic lighting in a building

4 / 31
Linear Algebra
Linear algebra

note: 1 means leaves the node, -1 means enters the node, 0 no connection
between nodes
5 / 31
Linear Algebra
Introduction to matrices
A system of linear equations:

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

x1 and x2 are variables which are put into a vector x


The output is put in a vector b
The coefficients before the variables are put in a matrix A
Ax = b:
    
1 −2 x1 −1
=
−1 3 x2 3

6 / 31
Linear Algebra
Introduction to matrices

The augmented matrix


The coefficients of the variables and the solution can be aligned in columns,
this gives the augmented matrix:
 
1 −2 −1
−1 3 3

7 / 31
Linear Algebra
Dimension of a matrix

 
a11 . . . a1m
A =  a21
 .. 
. a2m 
an1 . . . anm
The size of a matrix is the number of rows times the number of columns
Dim(A) = n × m. A square matrix has dimension n × n.

8 / 31
Linear Algebra
Special matrices
Identity matrix  
1 0
I=
0 1
This is also a diagonal matrix.
Inverse of the matrix A is denoted A−1 .
The transpose AT , rows become columns.
Upper triangular matrix / echelon form
 
a11 a12 a13
A =  0 a22 a23 
0 0 a33

and there is also a lower triangular matrix.


9 / 31
Linear Algebra
Transpose example

 
1 8
3 2
A=
4

3
2 4
then  
T 1 3 4 2
A =
8 2 3 4
Dim(A) = 4 × 2 and Dim(AT ) = 2 × 4

10 / 31
Linear Algebra
Matrix operations
Addition and subtraction: Dimensions need to be the same
Example addition: add a11 + b11 and do that will all the coefficients.
Add  
1 8
3 2
A= 4 3

2 4
and  
1 −5
−2 6 
B=
 3 −7

4 8

11 / 31
Linear Algebra
Matrix operations

Example addition:
     
1 8 1 −5 2 3
 + −2 6  = 1 8 
3 2    

4 3   3 −7  7 −4
2 4 4 8 6 12
Now do the subtraction.

12 / 31
Linear Algebra
Matrix operations

Multiplication of a matrix with a scalar:


   
1 8 2 16
3 2 6 4 
kA = 2 ∗ 4 3 = 8 6 
  

2 4 4 8

13 / 31
Linear Algebra
Matrix operations

In matrix multiplication the dimensions are important n × m multiply with


m × p results in n × p.
To be able to multiply matrices the # of columns of the first matrix needs to
be the same as the # rows of the second.

14 / 31
Linear Algebra
Matrix operations

Multiply matrix A with matrix B example.


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

and  
3 −1
B = 4 2 
2 0

15 / 31
Linear Algebra
Matrix operations
Multiply matrix A with matrix B example.
 
1 2 −3
A = 5 0 2
1 −1 −1
and  
3 −1
B = 4 2 
2 0
Yields:  
5 3
A · B =  19 −5
−3 −3
16 / 31
Linear Algebra
Properties of matrix multiplication

Associative (AB)C = A(BC)


Commutative AB 6= BA
(λA)B = A(λB)
(A + B)C = AC + BC
AI = IA
Transpose (AB)T = B T AT

17 / 31
Linear Algebra
Exercise 1

What is the multiplication CD for


 
1 −2
C = −1 2 
−2 4

and  
1 1 0
D=
2 0 1
And what is DC?
Is CD = DC?

18 / 31
Linear Algebra
Exercise 2

Don’t forget that the dimensions are very important! Row × column.
What is the result of the multiplication of AB:
   
2 −3 8 4
A= ,B =
−4 6 5 5

19 / 31
Linear Algebra
Vectors
 
a
b
Column vector v =  
. . .
n
 
Row vector a = a1 a2 . . . an
Notation of a vector: ~a, a or a
The row vector is the transpose of the column vector vT = a
Unit vector has a length of 1, notation v̂
Scalar product or dot product (inproduct)
Vector product or cross product (uitproduct)

20 / 31
Linear Algebra
Scalar product

Scalar product or dot product: pa · b = |a||b| cos θ


|a| is the length of a vector ( a21 + a22 + · · · + a2n )

Figuur: Dot product

21 / 31
Linear Algebra
Cross product

Vector product or cross product (uitwendigproduct)

Figuur: Cross product / right hand rule upwards and downwards

a × b = |a||b| sin(θ)n̂ = (a2 b3 − a3 b2 )i − (a1 b3 − a3 b1 )j + (a1 b2 − a2 b1 )k

22 / 31
Linear Algebra
Cross product
This is used when you want to find a Moment.

Figuur: Example of a vector product

M=r×F
23 / 31
Linear Algebra
Cross product
There are different ways to calculate the vector product:
Method 1:
 
i j k
a2 a3

a1 a3

a1 a2
a2 b3 − b2 a3
b2 b3 i − b1 b3 j + b1 b2 k = b1 a3 − a1 b3
a1 a2 a3 =  

b1 b2 b3 a1 b2 − b1 a2
Method 2: starting point now make 3 crosses.
a1 b1
a2 b2
a3 b3
a1 b1
a2 b2
a3 b3
24 / 31
Linear Algebra
Cross product exercise

   
7 1
a = 1 and b =  3  calculate the crossproduct.
2 −2

25 / 31
Linear Algebra

26 / 31
Linear Algebra
Course schedule week 1

27 / 31
Linear Algebra
Answer subtraction

 
0 13
 5 −4
A−B = 
 1 10 
−2 −4

28 / 31
Linear Algebra
Answer exercise 1

 
  1 −2  
1 1 0  1 · 1 + 1 · −1 + 0 · −2 1 · −2 + 1 · 2 + 0 · 4
DC = −1 2 =

2 0 1 1 · 2 + 0 · −1 + 1 · −2 2 · −2 + 0 · 2 + 1 · 4
−2 4
 
0 0
=
0 0
 
−3 1 2
CD =  3 −1 2
6 −2 4
DC 6= CD
29 / 31
Linear Algebra
Answer exercise 2

      
2 −3 8 4 8 · 2 + −3 · 5 2 · 4 + −3 · 5 1 −7
AB = = =
−4 6 5 5 8 · −4 + 6 · 5 4 · −4 + 6 · 5 −2 14

30 / 31
Linear Algebra
Answer exercise 3

 
−8
a × b = 16 

20

31 / 31

You might also like