SlideShare una empresa de Scribd logo
1 de 37
SYSTEM OF LINEAR
EQUATIONS
& MATRICES
What is a matrix?
 A matrix is a rectangular array of elements
 The elements may be of any type (e.g. integer, real, complex,
logical, or even other matrices).
 In this course we will only consider matrices that have integer, real,
or complex elements.
−5 0 1 2
3 −4 −9 2
3 1 4 2






Order of matrices…
 Order 4 × 3:
 Order 3 × 4:
3 columns→
4 rows
↓
−5 0 1
2 3 −4
−9 2 6
3 1 4












4 columns→
3 rows
↓
−5 0 1 2
3 −4 −9 2
3 1 4 2










Specifying matrix elements
aij denotes the element of the matrix A on
the ith
row and jth
column.
A=
column j →
row i
↓
−5 0 1
2 3 −4
−9 2 6
3 1 4








• a12 = 0
• a21 = 2
• a23 = -4
• a32 = 2
• a41 = 3
• a43 = 4
Matrix operations: scalar multiplication
 Multiplying an m × n matrix by a scalar results in an m × n matrix with each
of its elements multiplied by the scalar.
 e.g.












−−−
−−
−−
−
=












−
−
−
−












−
−
−
=












−
−
−
826
12418
864
2010
413
629
432
105
2
1239
18627
1296
3015
413
629
432
105
3
Matrix operations: addition…
 Adding or subtracting an m × n matrix by an m × n matrix results in an m × n
matrix with each of its elements added or subtracted.
 e.g.












−
−
−
−−−
=












−
−
−−
−












−
−
−












−
−
−
−
=












−
−
−−
+












−
−
−
431
8112
113
136
024
213
541
231
413
629
432
105
417
436
971
334
024
213
541
231
413
629
432
105
…Matrix operations: addition
 Note that matrices being added or
subtracted must be of the same order.
 e.g. invalid!
113
201
413
629
432
105
=




−
+












−
−
−
Matrix operations: multiplication…
 Multiplying an m × n matrix by an n × p
matrix
results in an m × p matrix












•••••
•••••
•••••
•••••
↓
→
=










•••••
•••••
•••••
↓
→












•••
•••
•••
•••
↓
→
wsrom
columnsp
wsron
columnsp
wsrom
columnsn
…Matrix operations: multiplication…
 Example 1…
−1 0 2
3 1 1






2 −1
3 −2
1 −4










=
0





(−1×2)+(0×3)+(2×1)=0
−1 0 2
3 1 1






2 −1
3 −2
1 −4










=
0 −7





(−1×−1)+(0×−2)+(2×−4)=−7
−1 0 2
3 1 1






2 −1
3 −2
1 −4










=
0 −7
10






(3×2)+(1×3)+(1×1)=10
−1 0 2
3 1 1






2 −1
3 −2
1 −4










=
0 −7
10 −9






(3×−1)+(1×−2)+(1×−4)=−9
…Matrix operations: multiplication…
 Example 2
 i.e. the number of columns in the first matrix must equal
the number of rows in the second matrix!
invalid!=




−










−
−
−
113
201
124
862
351
…Matrix operations: multiplication…
 Matrix multiplication is NOT commutative
 In general, if A and B are two matrices then A B ≠ B A
 i.e. the order of matrix multiplication is important!
 e.g.






=

















=











10
22
10
02
10
21
10
42
10
21
10
02
…Matrix operations: transpose…
 If B = AT
, then bij = aji
 i.e. the transpose of an m × n matrix is an n × m matrix with the rows
and columns swapped.
 e.g.










−
−−
=












−
−
−
4641
1230
3925
413
629
432
105
T
[ ]3925
3
9
2
5
−−=












−
−
T
…Matrix operations: transpose…
 (A B)T
= BT
AT
 Note the reversal of order.
 Justification (not a proof):
e.g. if A is 3 × 2 and B is 2 × 4
then AT
is 2 × 3 and BT
is 4 × 2
so AT
BT
cannot be multiplied
but BT
AT
can be multiplied.
Special matrices: row and column
 A 1 × n matrix is called a row matrix.
e.g.
 An m × 1 matrix is called a column matrix.
e.g.
1 columns→
3 rows
↓
3
−1
5










6 columns→
1 rows
↓
2 1 1 −2 1 −5[ ]
Special matrices: square
 An n × n matrix is called a square matrix.
i.e. a square matrix has the same number
of rows and columns.
e.g.
[ ]












−−
−−









 −−






−
4705
7350
0523
5031
211
010
210
21
32
1
Special matrices: diagonal
 A square matrix is diagonal if non-zero elements only occur on the leading diagonal.
i.e. aij = 0 for i ≠ j
e.g.
 Premultiplying a matrix by a diagonal matrix scales each row by the diagonal
element.
 Postmultiplying a matrix by a diagonal matrix scales each column by the diagonal
element.
[ ]




























−
4000
0300
0020
0001
200
010
000
20
02
1
Special matrices: triangular
 A lower triangular matrix is a square matrix having all elements
above the leading diagonal zero.
e.g.
 An upper triangular matrix is a square matrix having all elements
below the leading diagonal zero.
e.g.












−
−
4705
0350
0023
0001
1 2
0 −1




Special matrices: null
 The null matrix, 0, behaves like 0 in arithmetic addition
and subtraction.
 Null matrices can be of any order and have all of their
elements zero.
[ ]
[ ]












=
















=
=
=
0000
0000
0000
0000
00
00
00
00
00
000
0
00
0
0
Special matrices: identity…
 The identity matrix, I, behaves like 1 in arithmetic multiplication.
 Identity matrices are diagonal. They have 1s on the diagonal and 0s
elsewhere.
e.g.
 In the world of the matrix the identity truly is ‘the one’.
[ ]












=










=






==
1000
0100
0010
0001
100
010
001
10
01
1
II
II
…Special matrices: identity
 The identity matrix multiplied by any compatible matrix
results in the same matrix.
i.e. I A = A
e.g.
 Any matrix multiplied by a compatible identity matrix
results in the same matrix.
i.e. A I = A
e.g.
 Multiplication by the identity matrix is thus commutative.






=











51
13
51
13
10
01






=











51
13
10
01
51
13
Determinant of a 2×2 matrix…
 Matrices can represent geometric
transformations, such as scaling, rotation, shear,
and mirroring.
 2 × 2 matrices can represent geometric
transformations in a 2–dimensional space, such
as a plane.
 Determinants of 2 × 2 matrices give us
information about how such transformations
change the area of shapes.
 Determinants are also useful to define the
inverse of a matrix.
…Determinant of a 2×2 matrix…
 The determinant of a 2 × 2 matrix is the product
of the 2 leading diagonal terms minus the
product of the cross- diagonal.
 i.e. if A is a 2 × 2 matrix, then the determinant of
A is denoted by det(A) = |A| = a11 a22 – a21 a12
 e.g. det
3 −1
2 6





=
3 −1
2 6
= 3×6( )− 2×−1( )=20
det
−2 5
1 3





=
−2 5
1 3
= −2×3( )− 1×5( )=−11
…Determinant of a 2×2 matrix
 |A B| = |A| |B|
 Note the order is not important.
 Justification (not a proof):
We will shortly see that A and B can represent geometric
transformations, and A B represents the combined transformation of
B followed by A. The determinant represents the factor by which the
area is changed, so the combined transformation changes area by a
factor |A B|. Looking at the individual transformations, the area of
the first is changed by a factor |B|, and the second by |A|. The
overall transformation is thus changed by a factor |B| |A|, which is
the same as |A| |B|.
Inverse of a matrix
 In arithmetic multiplication the inverse of a number c is
1/c since
c × 1/c = 1 and 1/c × c = 1
 For matrices the inverse of a matrix A is denoted by A-1
 A A-1
= I
A-1
A = I
where I is the identity matrix.
 Multiplication of a matrix by its inverse is thus
commutative.
 We shall only consider the inverse of 2 × 2 matrices.
Inverse of a 2×2 matrix…
 The inverse of a 2 × 2 matrix A is given by
 Note:
The leading term is 1/determinant;
The diagonal elements are swapped;
The cross-diagonal elements change their sign.
a11 a12
a21 a22






−1
=
1
a11 a12
a21 a22
a22 −a12
−a21 a11






…Inverse of a 2×2 matrix…
 Example 1
 Note that A A-1
= I (right inverse)
and A-1
A = I (left inverse)





 −
=




 −
−
=





−
−
11
24
6
1
11
24
41
21
1
41
21
1






=




 −






− 10
01
11
24
6
1
41
21






=





−




 −
10
01
41
21
11
24
6
1
…Inverse of a 2×2 matrix…
 Example 2
 Note that the determinant is zero so the inverse
does not exist for this matrix.
 Matrices with zero determinant can have no
inverse.
 Such matrices are called singular.
2 2
3 3






−1
=
1
2 2
3 3
3 −2
−3 2





=
1
0
3 −2
2 2





= invalid!
…Inverse of a 2×2 matrix…
 (A B)-1
= B-1
A-1
 Note the reversal of order.
 Justification (not a proof):
B-1
A-1
A B = B-1
(A-1
A) B = B-1
B = I
so B-1
A-1
is the inverse of A B
i.e. (A B)-1
= B-1
A-1
29
Matrix Solution of Linear
Systems
When solving systems of
linear equations, we can
represent a linear system of
equations by an
augmented matrix, a
matrix which stores the
coefficients and constants
of the linear system and
then manipulate the
augmented matrix to obtain
the solution of the system.
Example:
x + 3y = 5
2x – y = 3
1 3 5
2 1 3
 
 
− 
The augmented matrix
associated with the above
system is
30
Generalization
 Linear system:  Associated
augmented matrix:
11 12 1
21 22 2
a a k
a a k
 
 
 
2222121
1212111
kxaxa
kxaxa
=+
=+
Operations that Produce
Row-Equivalent Matrices
 1. Two rows are interchanged:
 2. A row is multiplied by a nonzero
constant:
 3. A constant multiple of one row is added
to another row:
i jR R↔
i ikR R→
j i ikR R R+ →
Augmented Matrix Method
Example 1
Solve
x + 3y = 5
2x – y = 3
1. Augmented system
2. Eliminate 2 in 2nd
row by
row operation
3. Divide row two by -7 to
obtain a coefficient of 1.
4. Eliminate the 3 in first
row, second position.
5. Read solution from matrix
 :
1 2
2 2
2 1 1
1 3 5
2 1 3
2
1 3 5
0 7 7
/ 7
1 3 5
0 1 1
3
10 2
2, 1;(2,1)
01 1
R R
R R
R R R
x y
 
 
− 
− + →
 
 
− − 
− → →
 
 
 
− + → →
 
→ = = 
 
R2
Augmented Matrix Method
Example 2
Solve
x + 2y = 4
x + (1/2)y = 4
1. Eliminate fraction in second equation
by multiplying by 2
2. Write system as augmented matrix.
3. Multiply row 1 by -2 and add to row 2
4. Divide row 2 by -3
5. Multiply row 2 by -2 and add to row
1.
6. Read solution : x = 4, y = 0
7. (4,0)
2 4
1
4 2 8
2
1 2 4
2 1 8
1 2 4
0 3 0
1 2 4
0 1 0
1 0 4
0 1 0
x y
x y x y
+ =
+ = → + =
 
→ 
 
 
→ 
− 
 
→ 
 
 
→ 
 
Augmented Matrix Method
Example 3
Solve
10x - 2y = 6
-5x + y = -3
1. Represent as augmented matrix.
2. Divide row 1 by 2
3. Add row 1 to row 2 and replace row 2
by sum
4. Since 0 = 0 is always true, we have a
dependent system. The two equations
are identical, and there are infinitely
many solutions.
10 2 6
5 1 3
5 1 3
5 1 3
5 1 3
0 0 0
 − 
 
− − 
 − 
 
− − 
 − 
 
 
Augmented Matrix Method
Example 4
 Solve
 Rewrite second equation
 Add first row to second row
 The last row is the equivalent
of 0x + 0y = -5
 Since we have an impossible
equation, there is no
solution. The two lines are
parallel and do not intersect.
5 2 7
5
1
2
x y
y x
− = −
= + 5 2 7
5 2 2
5 2 7
5 2 2
5 2 7
0 0 5
x y
x y
− = − 
→
− + = 
 − − 
→ 
− 
 − − 
 
− 
Possible Final Matrix Forms for a
Linear System in Two Variables
Form 1: Unique Solution
(Consistent and Independent)
1 0
0 1
m
n
 
 
 
Form 2: Infinitely Many Solutions
(Consistent and Dependent)
1
0 0 0
m n 
 
 
Form 3: No Solution (Inconsistent)
1
0 0
m n
p
 
 
 
systems of linear equations & matrices

Más contenido relacionado

La actualidad más candente

Cramers rule
Cramers ruleCramers rule
Cramers rule
mstf mstf
 
Solving systems of Linear Equations
Solving systems of Linear EquationsSolving systems of Linear Equations
Solving systems of Linear Equations
swartzje
 
Eigen values and eigen vectors engineering
Eigen values and eigen vectors engineeringEigen values and eigen vectors engineering
Eigen values and eigen vectors engineering
shubham211
 
5.4 mathematical induction
5.4 mathematical induction5.4 mathematical induction
5.4 mathematical induction
math260
 
Binomial Theorem
Binomial TheoremBinomial Theorem
Binomial Theorem
itutor
 

La actualidad más candente (20)

Sequences and Series
Sequences and SeriesSequences and Series
Sequences and Series
 
Maths-->>Eigenvalues and eigenvectors
Maths-->>Eigenvalues and eigenvectorsMaths-->>Eigenvalues and eigenvectors
Maths-->>Eigenvalues and eigenvectors
 
Cramers rule
Cramers ruleCramers rule
Cramers rule
 
Differential equations
Differential equationsDifferential equations
Differential equations
 
Matrix and Determinants
Matrix and DeterminantsMatrix and Determinants
Matrix and Determinants
 
Solving systems of Linear Equations
Solving systems of Linear EquationsSolving systems of Linear Equations
Solving systems of Linear Equations
 
Eigen values and eigen vectors engineering
Eigen values and eigen vectors engineeringEigen values and eigen vectors engineering
Eigen values and eigen vectors engineering
 
Echelon forms
Echelon formsEchelon forms
Echelon forms
 
5.4 mathematical induction
5.4 mathematical induction5.4 mathematical induction
5.4 mathematical induction
 
Binomial Theorem
Binomial TheoremBinomial Theorem
Binomial Theorem
 
Gauss jordan and Guass elimination method
Gauss jordan and Guass elimination methodGauss jordan and Guass elimination method
Gauss jordan and Guass elimination method
 
Gauss jordan method.pptx
Gauss jordan method.pptxGauss jordan method.pptx
Gauss jordan method.pptx
 
Presentation on matrix
Presentation on matrixPresentation on matrix
Presentation on matrix
 
Presentation on inverse matrix
Presentation on inverse matrixPresentation on inverse matrix
Presentation on inverse matrix
 
Cramer's Rule
Cramer's RuleCramer's Rule
Cramer's Rule
 
Linear transformation.ppt
Linear transformation.pptLinear transformation.ppt
Linear transformation.ppt
 
Linear Equations
Linear EquationsLinear Equations
Linear Equations
 
Matrix algebra
Matrix algebraMatrix algebra
Matrix algebra
 
Determinants
DeterminantsDeterminants
Determinants
 
Matrices and determinants
Matrices and determinantsMatrices and determinants
Matrices and determinants
 

Destacado

Systems of linear equations and augmented matrices
Systems of linear equations and augmented matricesSystems of linear equations and augmented matrices
Systems of linear equations and augmented matrices
ST ZULAIHA NURHAJARURAHMAH
 
43040989[1]
43040989[1]43040989[1]
43040989[1]
IKHG
 
Unit viii
Unit viiiUnit viii
Unit viii
mrecedu
 

Destacado (20)

Eigenvalue problems .ppt
Eigenvalue problems .pptEigenvalue problems .ppt
Eigenvalue problems .ppt
 
Systems of linear equations and augmented matrices
Systems of linear equations and augmented matricesSystems of linear equations and augmented matrices
Systems of linear equations and augmented matrices
 
My Lecture Notes from Linear Algebra
My Lecture Notes fromLinear AlgebraMy Lecture Notes fromLinear Algebra
My Lecture Notes from Linear Algebra
 
เมทริกซ์
เมทริกซ์เมทริกซ์
เมทริกซ์
 
43040989[1]
43040989[1]43040989[1]
43040989[1]
 
Dk
DkDk
Dk
 
MATLAB - Aplication of Arrays and Matrices in Electrical Systems
MATLAB - Aplication of Arrays and Matrices in Electrical SystemsMATLAB - Aplication of Arrays and Matrices in Electrical Systems
MATLAB - Aplication of Arrays and Matrices in Electrical Systems
 
43040989
4304098943040989
43040989
 
9789740332985
97897403329859789740332985
9789740332985
 
Matrix
MatrixMatrix
Matrix
 
Unit 1 matrix
Unit 1 matrixUnit 1 matrix
Unit 1 matrix
 
ORTHOGONAL, ORTHONORMAL VECTOR, GRAM SCHMIDT PROCESS, ORTHOGONALLY DIAGONALI...
ORTHOGONAL, ORTHONORMAL  VECTOR, GRAM SCHMIDT PROCESS, ORTHOGONALLY DIAGONALI...ORTHOGONAL, ORTHONORMAL  VECTOR, GRAM SCHMIDT PROCESS, ORTHOGONALLY DIAGONALI...
ORTHOGONAL, ORTHONORMAL VECTOR, GRAM SCHMIDT PROCESS, ORTHOGONALLY DIAGONALI...
 
Matlab code for crout method
Matlab code for crout methodMatlab code for crout method
Matlab code for crout method
 
Matrix1
Matrix1Matrix1
Matrix1
 
เมทริกซ์ง่ายจะตาย
เมทริกซ์ง่ายจะตายเมทริกซ์ง่ายจะตาย
เมทริกซ์ง่ายจะตาย
 
Math 1300: Section 4-6 Matrix Equations and Systems of Linear Equations
Math 1300: Section 4-6 Matrix Equations and Systems of Linear EquationsMath 1300: Section 4-6 Matrix Equations and Systems of Linear Equations
Math 1300: Section 4-6 Matrix Equations and Systems of Linear Equations
 
Addition matrix
Addition matrixAddition matrix
Addition matrix
 
Matrices
Matrices Matrices
Matrices
 
เมทริกซ์...
เมทริกซ์...เมทริกซ์...
เมทริกซ์...
 
Unit viii
Unit viiiUnit viii
Unit viii
 

Similar a systems of linear equations & matrices

Beginning direct3d gameprogrammingmath05_matrices_20160515_jintaeks
Beginning direct3d gameprogrammingmath05_matrices_20160515_jintaeksBeginning direct3d gameprogrammingmath05_matrices_20160515_jintaeks
Beginning direct3d gameprogrammingmath05_matrices_20160515_jintaeks
JinTaek Seo
 

Similar a systems of linear equations & matrices (20)

Matrices 1
Matrices 1Matrices 1
Matrices 1
 
Business mathametics and statistics b.com ii semester (2)
Business mathametics and statistics b.com ii semester (2)Business mathametics and statistics b.com ii semester (2)
Business mathametics and statistics b.com ii semester (2)
 
Calculus and matrix algebra notes
Calculus and matrix algebra notesCalculus and matrix algebra notes
Calculus and matrix algebra notes
 
Bba i-bm-u-2- matrix -
Bba i-bm-u-2- matrix -Bba i-bm-u-2- matrix -
Bba i-bm-u-2- matrix -
 
ALLIED MATHEMATICS -I UNIT III MATRICES.ppt
ALLIED MATHEMATICS -I UNIT III MATRICES.pptALLIED MATHEMATICS -I UNIT III MATRICES.ppt
ALLIED MATHEMATICS -I UNIT III MATRICES.ppt
 
Engg maths k notes(4)
Engg maths k notes(4)Engg maths k notes(4)
Engg maths k notes(4)
 
Matrix and its operations
Matrix and its operationsMatrix and its operations
Matrix and its operations
 
Beginning direct3d gameprogrammingmath05_matrices_20160515_jintaeks
Beginning direct3d gameprogrammingmath05_matrices_20160515_jintaeksBeginning direct3d gameprogrammingmath05_matrices_20160515_jintaeks
Beginning direct3d gameprogrammingmath05_matrices_20160515_jintaeks
 
Matrices
MatricesMatrices
Matrices
 
matrix
matrixmatrix
matrix
 
M a t r i k s
M a t r i k sM a t r i k s
M a t r i k s
 
APM.pdf
APM.pdfAPM.pdf
APM.pdf
 
Determinants - Mathematics
Determinants - MathematicsDeterminants - Mathematics
Determinants - Mathematics
 
Matrices ,Basics, Determinant, Inverse, EigenValues, Linear Equations, RANK
Matrices ,Basics, Determinant, Inverse, EigenValues, Linear Equations, RANKMatrices ,Basics, Determinant, Inverse, EigenValues, Linear Equations, RANK
Matrices ,Basics, Determinant, Inverse, EigenValues, Linear Equations, RANK
 
Maths
MathsMaths
Maths
 
intruduction to Matrix in discrete structures.pptx
intruduction to Matrix in discrete structures.pptxintruduction to Matrix in discrete structures.pptx
intruduction to Matrix in discrete structures.pptx
 
Matrix_PPT.pptx
Matrix_PPT.pptxMatrix_PPT.pptx
Matrix_PPT.pptx
 
Matrices & Determinants.pdf
Matrices & Determinants.pdfMatrices & Determinants.pdf
Matrices & Determinants.pdf
 
Matrix presentation By DHEERAJ KATARIA
Matrix presentation By DHEERAJ KATARIAMatrix presentation By DHEERAJ KATARIA
Matrix presentation By DHEERAJ KATARIA
 
Matrix_PPT.pptx
Matrix_PPT.pptxMatrix_PPT.pptx
Matrix_PPT.pptx
 

Más de Student

Más de Student (9)

GEOGRAPHICAL INFORMATION SYSTEMS
GEOGRAPHICALINFORMATIONSYSTEMSGEOGRAPHICALINFORMATIONSYSTEMS
GEOGRAPHICAL INFORMATION SYSTEMS
 
HYDROLOGICAL PROPERTIES OF WATER BEARING STRATA
HYDROLOGICAL PROPERTIES OF WATER BEARING STRATA HYDROLOGICAL PROPERTIES OF WATER BEARING STRATA
HYDROLOGICAL PROPERTIES OF WATER BEARING STRATA
 
Geological Disaster
Geological DisasterGeological Disaster
Geological Disaster
 
Population Dynamics
Population DynamicsPopulation Dynamics
Population Dynamics
 
Parameters of waste water analysis
Parameters of waste water analysisParameters of waste water analysis
Parameters of waste water analysis
 
Prokaryotic &eukaryotic cells
Prokaryotic &eukaryotic cellsProkaryotic &eukaryotic cells
Prokaryotic &eukaryotic cells
 
Land Pollution
Land PollutionLand Pollution
Land Pollution
 
Isomeric Projection
Isomeric ProjectionIsomeric Projection
Isomeric Projection
 
contributor personality developement
contributor personality developement contributor personality developement
contributor personality developement
 

Último

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 

Último (20)

Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 

systems of linear equations & matrices

  • 2. What is a matrix?  A matrix is a rectangular array of elements  The elements may be of any type (e.g. integer, real, complex, logical, or even other matrices).  In this course we will only consider matrices that have integer, real, or complex elements. −5 0 1 2 3 −4 −9 2 3 1 4 2      
  • 3. Order of matrices…  Order 4 × 3:  Order 3 × 4: 3 columns→ 4 rows ↓ −5 0 1 2 3 −4 −9 2 6 3 1 4             4 columns→ 3 rows ↓ −5 0 1 2 3 −4 −9 2 3 1 4 2          
  • 4. Specifying matrix elements aij denotes the element of the matrix A on the ith row and jth column. A= column j → row i ↓ −5 0 1 2 3 −4 −9 2 6 3 1 4         • a12 = 0 • a21 = 2 • a23 = -4 • a32 = 2 • a41 = 3 • a43 = 4
  • 5. Matrix operations: scalar multiplication  Multiplying an m × n matrix by a scalar results in an m × n matrix with each of its elements multiplied by the scalar.  e.g.             −−− −− −− − =             − − − −             − − − =             − − − 826 12418 864 2010 413 629 432 105 2 1239 18627 1296 3015 413 629 432 105 3
  • 6. Matrix operations: addition…  Adding or subtracting an m × n matrix by an m × n matrix results in an m × n matrix with each of its elements added or subtracted.  e.g.             − − − −−− =             − − −− −             − − −             − − − − =             − − −− +             − − − 431 8112 113 136 024 213 541 231 413 629 432 105 417 436 971 334 024 213 541 231 413 629 432 105
  • 7. …Matrix operations: addition  Note that matrices being added or subtracted must be of the same order.  e.g. invalid! 113 201 413 629 432 105 =     − +             − − −
  • 8. Matrix operations: multiplication…  Multiplying an m × n matrix by an n × p matrix results in an m × p matrix             ••••• ••••• ••••• ••••• ↓ → =           ••••• ••••• ••••• ↓ →             ••• ••• ••• ••• ↓ → wsrom columnsp wsron columnsp wsrom columnsn
  • 9. …Matrix operations: multiplication…  Example 1… −1 0 2 3 1 1       2 −1 3 −2 1 −4           = 0      (−1×2)+(0×3)+(2×1)=0 −1 0 2 3 1 1       2 −1 3 −2 1 −4           = 0 −7      (−1×−1)+(0×−2)+(2×−4)=−7 −1 0 2 3 1 1       2 −1 3 −2 1 −4           = 0 −7 10       (3×2)+(1×3)+(1×1)=10 −1 0 2 3 1 1       2 −1 3 −2 1 −4           = 0 −7 10 −9       (3×−1)+(1×−2)+(1×−4)=−9
  • 10. …Matrix operations: multiplication…  Example 2  i.e. the number of columns in the first matrix must equal the number of rows in the second matrix! invalid!=     −           − − − 113 201 124 862 351
  • 11. …Matrix operations: multiplication…  Matrix multiplication is NOT commutative  In general, if A and B are two matrices then A B ≠ B A  i.e. the order of matrix multiplication is important!  e.g.       =                  =            10 22 10 02 10 21 10 42 10 21 10 02
  • 12. …Matrix operations: transpose…  If B = AT , then bij = aji  i.e. the transpose of an m × n matrix is an n × m matrix with the rows and columns swapped.  e.g.           − −− =             − − − 4641 1230 3925 413 629 432 105 T [ ]3925 3 9 2 5 −−=             − − T
  • 13. …Matrix operations: transpose…  (A B)T = BT AT  Note the reversal of order.  Justification (not a proof): e.g. if A is 3 × 2 and B is 2 × 4 then AT is 2 × 3 and BT is 4 × 2 so AT BT cannot be multiplied but BT AT can be multiplied.
  • 14. Special matrices: row and column  A 1 × n matrix is called a row matrix. e.g.  An m × 1 matrix is called a column matrix. e.g. 1 columns→ 3 rows ↓ 3 −1 5           6 columns→ 1 rows ↓ 2 1 1 −2 1 −5[ ]
  • 15. Special matrices: square  An n × n matrix is called a square matrix. i.e. a square matrix has the same number of rows and columns. e.g. [ ]             −− −−           −−       − 4705 7350 0523 5031 211 010 210 21 32 1
  • 16. Special matrices: diagonal  A square matrix is diagonal if non-zero elements only occur on the leading diagonal. i.e. aij = 0 for i ≠ j e.g.  Premultiplying a matrix by a diagonal matrix scales each row by the diagonal element.  Postmultiplying a matrix by a diagonal matrix scales each column by the diagonal element. [ ]                             − 4000 0300 0020 0001 200 010 000 20 02 1
  • 17. Special matrices: triangular  A lower triangular matrix is a square matrix having all elements above the leading diagonal zero. e.g.  An upper triangular matrix is a square matrix having all elements below the leading diagonal zero. e.g.             − − 4705 0350 0023 0001 1 2 0 −1    
  • 18. Special matrices: null  The null matrix, 0, behaves like 0 in arithmetic addition and subtraction.  Null matrices can be of any order and have all of their elements zero. [ ] [ ]             =                 = = = 0000 0000 0000 0000 00 00 00 00 00 000 0 00 0 0
  • 19. Special matrices: identity…  The identity matrix, I, behaves like 1 in arithmetic multiplication.  Identity matrices are diagonal. They have 1s on the diagonal and 0s elsewhere. e.g.  In the world of the matrix the identity truly is ‘the one’. [ ]             =           =       == 1000 0100 0010 0001 100 010 001 10 01 1 II II
  • 20. …Special matrices: identity  The identity matrix multiplied by any compatible matrix results in the same matrix. i.e. I A = A e.g.  Any matrix multiplied by a compatible identity matrix results in the same matrix. i.e. A I = A e.g.  Multiplication by the identity matrix is thus commutative.       =            51 13 51 13 10 01       =            51 13 10 01 51 13
  • 21. Determinant of a 2×2 matrix…  Matrices can represent geometric transformations, such as scaling, rotation, shear, and mirroring.  2 × 2 matrices can represent geometric transformations in a 2–dimensional space, such as a plane.  Determinants of 2 × 2 matrices give us information about how such transformations change the area of shapes.  Determinants are also useful to define the inverse of a matrix.
  • 22. …Determinant of a 2×2 matrix…  The determinant of a 2 × 2 matrix is the product of the 2 leading diagonal terms minus the product of the cross- diagonal.  i.e. if A is a 2 × 2 matrix, then the determinant of A is denoted by det(A) = |A| = a11 a22 – a21 a12  e.g. det 3 −1 2 6      = 3 −1 2 6 = 3×6( )− 2×−1( )=20 det −2 5 1 3      = −2 5 1 3 = −2×3( )− 1×5( )=−11
  • 23. …Determinant of a 2×2 matrix  |A B| = |A| |B|  Note the order is not important.  Justification (not a proof): We will shortly see that A and B can represent geometric transformations, and A B represents the combined transformation of B followed by A. The determinant represents the factor by which the area is changed, so the combined transformation changes area by a factor |A B|. Looking at the individual transformations, the area of the first is changed by a factor |B|, and the second by |A|. The overall transformation is thus changed by a factor |B| |A|, which is the same as |A| |B|.
  • 24. Inverse of a matrix  In arithmetic multiplication the inverse of a number c is 1/c since c × 1/c = 1 and 1/c × c = 1  For matrices the inverse of a matrix A is denoted by A-1  A A-1 = I A-1 A = I where I is the identity matrix.  Multiplication of a matrix by its inverse is thus commutative.  We shall only consider the inverse of 2 × 2 matrices.
  • 25. Inverse of a 2×2 matrix…  The inverse of a 2 × 2 matrix A is given by  Note: The leading term is 1/determinant; The diagonal elements are swapped; The cross-diagonal elements change their sign. a11 a12 a21 a22       −1 = 1 a11 a12 a21 a22 a22 −a12 −a21 a11      
  • 26. …Inverse of a 2×2 matrix…  Example 1  Note that A A-1 = I (right inverse) and A-1 A = I (left inverse)       − =      − − =      − − 11 24 6 1 11 24 41 21 1 41 21 1       =      −       − 10 01 11 24 6 1 41 21       =      −      − 10 01 41 21 11 24 6 1
  • 27. …Inverse of a 2×2 matrix…  Example 2  Note that the determinant is zero so the inverse does not exist for this matrix.  Matrices with zero determinant can have no inverse.  Such matrices are called singular. 2 2 3 3       −1 = 1 2 2 3 3 3 −2 −3 2      = 1 0 3 −2 2 2      = invalid!
  • 28. …Inverse of a 2×2 matrix…  (A B)-1 = B-1 A-1  Note the reversal of order.  Justification (not a proof): B-1 A-1 A B = B-1 (A-1 A) B = B-1 B = I so B-1 A-1 is the inverse of A B i.e. (A B)-1 = B-1 A-1
  • 29. 29 Matrix Solution of Linear Systems When solving systems of linear equations, we can represent a linear system of equations by an augmented matrix, a matrix which stores the coefficients and constants of the linear system and then manipulate the augmented matrix to obtain the solution of the system. Example: x + 3y = 5 2x – y = 3 1 3 5 2 1 3     −  The augmented matrix associated with the above system is
  • 30. 30 Generalization  Linear system:  Associated augmented matrix: 11 12 1 21 22 2 a a k a a k       2222121 1212111 kxaxa kxaxa =+ =+
  • 31. Operations that Produce Row-Equivalent Matrices  1. Two rows are interchanged:  2. A row is multiplied by a nonzero constant:  3. A constant multiple of one row is added to another row: i jR R↔ i ikR R→ j i ikR R R+ →
  • 32. Augmented Matrix Method Example 1 Solve x + 3y = 5 2x – y = 3 1. Augmented system 2. Eliminate 2 in 2nd row by row operation 3. Divide row two by -7 to obtain a coefficient of 1. 4. Eliminate the 3 in first row, second position. 5. Read solution from matrix  : 1 2 2 2 2 1 1 1 3 5 2 1 3 2 1 3 5 0 7 7 / 7 1 3 5 0 1 1 3 10 2 2, 1;(2,1) 01 1 R R R R R R R x y     −  − + →     − −  − → →       − + → →   → = =    R2
  • 33. Augmented Matrix Method Example 2 Solve x + 2y = 4 x + (1/2)y = 4 1. Eliminate fraction in second equation by multiplying by 2 2. Write system as augmented matrix. 3. Multiply row 1 by -2 and add to row 2 4. Divide row 2 by -3 5. Multiply row 2 by -2 and add to row 1. 6. Read solution : x = 4, y = 0 7. (4,0) 2 4 1 4 2 8 2 1 2 4 2 1 8 1 2 4 0 3 0 1 2 4 0 1 0 1 0 4 0 1 0 x y x y x y + = + = → + =   →      →  −    →      →   
  • 34. Augmented Matrix Method Example 3 Solve 10x - 2y = 6 -5x + y = -3 1. Represent as augmented matrix. 2. Divide row 1 by 2 3. Add row 1 to row 2 and replace row 2 by sum 4. Since 0 = 0 is always true, we have a dependent system. The two equations are identical, and there are infinitely many solutions. 10 2 6 5 1 3 5 1 3 5 1 3 5 1 3 0 0 0  −    − −   −    − −   −     
  • 35. Augmented Matrix Method Example 4  Solve  Rewrite second equation  Add first row to second row  The last row is the equivalent of 0x + 0y = -5  Since we have an impossible equation, there is no solution. The two lines are parallel and do not intersect. 5 2 7 5 1 2 x y y x − = − = + 5 2 7 5 2 2 5 2 7 5 2 2 5 2 7 0 0 5 x y x y − = −  → − + =   − −  →  −   − −    − 
  • 36. Possible Final Matrix Forms for a Linear System in Two Variables Form 1: Unique Solution (Consistent and Independent) 1 0 0 1 m n       Form 2: Infinitely Many Solutions (Consistent and Dependent) 1 0 0 0 m n      Form 3: No Solution (Inconsistent) 1 0 0 m n p      