0% found this document useful (0 votes)
10 views50 pages

Comprehensive Guide to Matrices

The document provides an introduction to matrices, detailing their structure, operations, and applications in organizing data, solving equations, and representing relationships. It covers matrix operations including addition, subtraction, scalar multiplication, and multiplication of matrices, along with special types of matrices such as identity and diagonal matrices. Additionally, it illustrates practical examples from biology and chemistry to demonstrate the utility of matrices in real-world scenarios.

Uploaded by

suleimanbasu3
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views50 pages

Comprehensive Guide to Matrices

The document provides an introduction to matrices, detailing their structure, operations, and applications in organizing data, solving equations, and representing relationships. It covers matrix operations including addition, subtraction, scalar multiplication, and multiplication of matrices, along with special types of matrices such as identity and diagonal matrices. Additionally, it illustrates practical examples from biology and chemistry to demonstrate the utility of matrices in real-world scenarios.

Uploaded by

suleimanbasu3
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Matrices
Dr. E. Mujuni
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Introduction to Matrices
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Introduction
A matrix is a rectangular array of numbers arranged in rows
and columns, used to organise data or solve systems of
equations.
Example


 7 8
1 2 3
M1 = and M2 =  9 10
4 5 6
11 12
M1 is 2 × 3 matrix with 2 rows and 3 columns, while M2 is a
3 × 2 matrix with 3 rows and 2 columns.
Matrices are widely applied in biology and chemistry to model
relationships, process data, and perform computations
efficiently.
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Introduction
A matrix is a rectangular array of numbers arranged in rows
and columns, used to organise data or solve systems of
equations.
Example


 7 8
1 2 3
M1 = and M2 =  9 10
4 5 6
11 12
M1 is 2 × 3 matrix with 2 rows and 3 columns, while M2 is a
3 × 2 matrix with 3 rows and 2 columns.
Matrices are widely applied in biology and chemistry to model
relationships, process data, and perform computations
efficiently.
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Introduction
A matrix is a rectangular array of numbers arranged in rows
and columns, used to organise data or solve systems of
equations.
Example


 7 8
1 2 3
M1 = and M2 =  9 10
4 5 6
11 12
M1 is 2 × 3 matrix with 2 rows and 3 columns, while M2 is a
3 × 2 matrix with 3 rows and 2 columns.
Matrices are widely applied in biology and chemistry to model
relationships, process data, and perform computations
efficiently.
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Application 1: Organising Experimental Data


Example (Plant Growth Study)
A biologist records the weekly growth (in cm) of three plant
types (A, B, C) under two conditions: High Sunlight (HS)
and Low Sunlight (LS). The data is:
 
5 3
M = 7 4
6 2

Rows: Represent plant types (A, B, C).


Columns: Represent conditions (HS, LS).
To find the average growth for each plant, calculate the
row-wise averages:
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Application 2: Solving Systems of Equations

Example (Chemical Reactions)


Consider a chemical reaction involving three compounds A, B,
and C. The following equations represent the balance of
reactants and products in the reaction:
The amount of compound A and twice the amount of B
together yield 8 units.
Twice the amount of A, plus the amount of B, and the
amount of C together yield 12 units.
The amount of B and three times the amount of C
together yield 15 units.
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Application 2: Solving Systems of Equations,


cont...
Example (Chemical Reactions), cont...
The above system of chemical can be represented by the
following systems of equations.

x + 2y = 8, 2x + y + z = 12, y + 3z = 15

This can be written in matrix form:


    
1 2 0 x 8
2 1 1   y = 12
 
0 1 3 z 15

The solution gives the values of x, y, and z, representing the


quantities of reactants.
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Application 3: Representing Relationships

Example (Food Web)


A biologist studies an ecosystem with four species: Fish (F),
Shrimp (S), Algae (A), and Crabs (C). The predator-prey
relationships are represented as:
 
0 1 1 0
0 0 1 0
R= 0 0 0 0

0 1 0 0

Rows: Represent predators.


Columns: Represent prey.
For example, R12 = 1 means Fish prey on Shrimp.
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Basics

A matrix is a rectangular arrangement of numbers (or, in


some cases, symbols) whose position has significance.
Typically, square brackets are used to denote a matrix. For
example,  
2 6 4 6
A =  −4 8 2 6 
9 0 −7 25
The numbers (or symbols) in the matrix are referred to as
elements or entries. Matrices are often described in terms of
their order (or size, or shape). The matrix given above has 3
rows and 4 columns. Its order is consequently 3 × 4, and we
refer to it as a 3 × 4 matrix.
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Matrices Operations
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

A general m × n matrix A may be written as


 
a11 a12 ··· a1n
 a21 a22 ··· a2n 
A=  ··· ···

··· ··· 
am1 am2 ··· amn

where the element in the ith row and jth column is denoted aij .
Definition
Two matrices A and B are equal if they are the same order and
aij = bij for all i and j.
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Addition and Subtraction

Two matrices may be added or subtracted if they are of the


same order (have the same size/shape). Addition or
subtraction is done bf element-wise. For example, if
     
1 2 3 7 9 0 0 5
A= ,B = , and C =
4 5 6 3 1 4 6 9

Then  
8 11 3
A+B=
7 6 10
and  
−6 −7 3
A−B=
1 4 2
but A + C and A − C do not exist.
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Scalar Multiplication

Given a matrix A, we calculate kA by multiplying every


element of A by the scalar k. For example, if
 
1 2 3
A=
4 5 6

then  
7 14 21
7A =
28 35 42
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Multiplication of two Matrices

Not all matrices may be multiplied! Two matrices may be


multiplied together only if they are compatible, that is, the
number of columns of the first matrix must equal the number
of rows of the second matrix. That is, if A is a m × n matrix
and B is a r × p matrix then we can calculate AB only if n = r.
Definition
The product C = AB of an m × n matrix A = [aij ] and an
r × p matrix B = [bjk ] is defined only if and only if r = n and
then C = [cik ] is defined as the m × p with the entries

X
n
cik = aij bjk = ai1 b1k + ai2 b2k + . . . + ain bnk
j=1
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Example

  0 1
1 3 4
Given A = and B =  3 8 
6 2 5
9 2
Find AB and BA.

Solution
 
 0 1   
1 3 4  45 33
AB = 3 8 =
6 2 5 51 32
9 2
   
0 1   6 2 5

BA = 3 8  1 3 4 =  51 25 52 
6 2 5
9 2 21 31 46
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Example

  0 1
1 3 4
Given A = and B =  3 8 
6 2 5
9 2
Find AB and BA.

Solution
 
 0 1   
1 3 4  45 33
AB = 3 8 =
6 2 5 51 32
9 2
   
0 1   6 2 5

BA = 3 8  1 3 4 =  51 25 52 
6 2 5
9 2 21 31 46
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Theorem
The following properties hold for Matrix Multiplication
(a) AB ̸= BA in general
(b) AB = 0 does not necessarily A = 0 or B = 0 or BA = 0.
(c) kAB = k(AB) = A(kB)
(d) A(BC) = (AB)C
(e) A(B + C) = AB + AC
(f) (A + B)C = AC + BC
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Power of a Matrix

Integer powers of a matrix, e.g. A2 , A3 etc, are obtained by


multiplying A by itself the required number of times. That is,
A2 = AA and A3 = AAA = AA2 or A3 = A2 A
Transpose of a Matrix
The transpose of a matrix A, denoted AT is the matrix
obtained when the rows
 and columns
 of A are interchanged.
6 3 5
For example, if A =
  4 7 2
6 4
then AT =  3 7 
5 2
Clearly (A ) = A and (AB)T = BT AT
T T
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Special Matrices
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Square Matrices

A matrix which has an equal number n of rows and columns


(i.e. is a n × n
matrix) is called a square matrix. For example, the following
are square matrices, where the first matrix is 3 × 2 and the
second is 2 × 2
 
5 3 1  
A = 4 7 9  6 3
B=
7 1
1 0 1

A matrix with a single column is called a column matrix


Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Identity Matrix

An identity matrix is a square matrix with zeros everywhere


except along the leading diagonal where every element is a
1. For example,
 
  1 0 0
1 0
and  0 1 0 
0 1
0 0 1

For any matrix A there is an identity matrix I such that


AI = A. There is also an identity matrix I such that IA = A.
The identity matrix functions like the number 1 in real
arithmetic.
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Diagonal Matrix

A Diagonal Matrix is a square matrix with zeros everywhere


except along the leading diagonal where there are some
non-zero elements, e.g.
 
  4 0 0
5 0
and  0 6 0 
0 2
0 0 0

Note
All Identity Matrices are Diagonal Matrices
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

A Symmetric Matrix A is a square matrix with the property


that AT = A.

Skew-Symmetrix Matrix
A Skew-Symmetrix Matrix A is a square matrix with the
property that AT = −A.

Inverse of a Matrix
The Inverse of a Matrix A, if it exists, is denoted by A−1.
The inverse A−1 has the property that

AA−1 = A−1 A = I
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Determinant
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Determinant

A determinant is a scalar value that is computed from the


elements of a square matrix.

It provides important properties of the matrix, such as


whether it is invertible.

Determinants are used in solving systems of linear


equations, finding eigenvalues, and more.

For biologists and chemists, determinants help in


analyzing stability in population dynamics, reaction
equilibria, and enzyme kinetics.
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Determinant

A determinant is a scalar value that is computed from the


elements of a square matrix.

It provides important properties of the matrix, such as


whether it is invertible.

Determinants are used in solving systems of linear


equations, finding eigenvalues, and more.

For biologists and chemists, determinants help in


analyzing stability in population dynamics, reaction
equilibria, and enzyme kinetics.
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Determinant

A determinant is a scalar value that is computed from the


elements of a square matrix.

It provides important properties of the matrix, such as


whether it is invertible.

Determinants are used in solving systems of linear


equations, finding eigenvalues, and more.

For biologists and chemists, determinants help in


analyzing stability in population dynamics, reaction
equilibria, and enzyme kinetics.
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Determinant

A determinant is a scalar value that is computed from the


elements of a square matrix.

It provides important properties of the matrix, such as


whether it is invertible.

Determinants are used in solving systems of linear


equations, finding eigenvalues, and more.

For biologists and chemists, determinants help in


analyzing stability in population dynamics, reaction
equilibria, and enzyme kinetics.
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

How to Compute Determinants

For a 2x2 matrix:


 
a b
det = ad − bc
c d

For a 3x3 matrix:


 
a b c

det d e f  = a(ei − fh) − b(di − fg) + c(dh − eg)
g h i

Larger matrices use cofactor expansion or row reduction.


Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Example
Consider a biological system where two species interact.
Species A benefits from Species B, while Species B faces
competition from Species A. To model their interactions, we
use the following rates:
Species A’s population changes at a rate influenced by its
own growth and the interaction with Species B.
Species B’s population changes at a rate influenced by its
own growth and the interaction with Species A.
This interaction can be expressed as a system of linear
equations:
dA
= 2A + B,
dt

dB
= −A + 3B.
dt
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Example, Cont...
At equilibrium, dA
dt
= 0 and dB
dt
= 0, representing constant
populations for both species.

These points help analyse stability by showing how the


system reacts to small changes.

A positive determinant indicates stability (returns to


equilibrium), while a negative determinant suggests
instability (diverges from equilibrium).
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Example, Cont...
Thus, at equilibrium, the system becomes:

0 = 2A + B,

0 = −A + 3B.

The system can be written in matrix form:


    
0 2 1 A
 =  .
0 −1 3 B

Computing the determinant of the matrix:


 
2 1
A= 
−1 3
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Example
A biological system has interactions between two species
represented by:  
2 1
A=
−1 3
Determine the stability of the system by calculating the
determinant of A.

Solution
det(A) = (2)(3) − (1)(−1) = 6 + 1 = 7

A positive determinant indicates stable coexistence


between the species.
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Example
A biological system has interactions between two species
represented by:  
2 1
A=
−1 3
Determine the stability of the system by calculating the
determinant of A.

Solution
det(A) = (2)(3) − (1)(−1) = 6 + 1 = 7

A positive determinant indicates stable coexistence


between the species.
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Example
A chemical reaction involves two substances, with reaction
rates represented by:
 
0.5 −0.2
B=
−0.3 0.7

Compute the determinant of B to understand reaction


stability.

Solution

det(B) = (0.5)(0.7) − (−0.2)(−0.3) = 0.35 − 0.06 = 0.29

A positive determinant suggests stable reaction


equilibrium.
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Example
A chemical reaction involves two substances, with reaction
rates represented by:
 
0.5 −0.2
B=
−0.3 0.7

Compute the determinant of B to understand reaction


stability.

Solution

det(B) = (0.5)(0.7) − (−0.2)(−0.3) = 0.35 − 0.06 = 0.29

A positive determinant suggests stable reaction


equilibrium.
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Example
Enzyme-substrate interactions are represented by the following
matrix:  
1 2 1
C = 3 1 0
2 4 1
Calculate the determinant of C and interpret the results in the
context of enzyme kinetics.
Solution
Using cofactor expansion:
1 0 3 0 3 1
−2
det(C) = 1 +1
4 1 2 1 2 4
Simplify each determinant:

det(C) = 1(1 − 0) − 2(3 − 0) + 1(12 − 2) = 1 − 6 + 10 = 5


Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Example
Enzyme-substrate interactions are represented by the following
matrix:  
1 2 1
C = 3 1 0
2 4 1
Calculate the determinant of C and interpret the results in the
context of enzyme kinetics.
Solution
Using cofactor expansion:
1 0 3 0 3 1
−2
det(C) = 1 +1
4 1 2 1 2 4
Simplify each determinant:

det(C) = 1(1 − 0) − 2(3 − 0) + 1(12 − 2) = 1 − 6 + 10 = 5


Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Eigenvalues and Eigenvectors


Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Eigenvalues and Eigenvectors

An eigenvector of a square matrix is a non-zero vector


that only changes by a scalar factor when the matrix is
applied to it.
The corresponding eigenvalue is the scalar by which the
eigenvector is scaled.
Mathematically, for a matrix A and eigenvector v, the
relationship is:
Av = λv,
where λ is the eigenvalue.
Eigenvalues and eigenvectors have important applications
in stability analysis, principal component analysis (PCA),
quantum mechanics, and more.
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

How to Compute Eigenvalues and Eigenvectors

For a square matrix A, the eigenvalues are found by


solving the characteristic equation:

det(A − λI) = 0,

where I is the identity matrix and λ is the eigenvalue.


Once eigenvalues are computed, eigenvectors are found
by solving:
(A − λI)v = 0,
where v is the eigenvector.
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Example
Consider the matrix:
 
6 2
A= .
2 3

Find the eigenvalues and eigenvectors of A.

Solution
The eigenvalues are the solutions of the characteristic
equation:
det(A − λI) = 0,
where 
6−λ 2
A − λI = .
2 3−λ
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Solution, cont...

det(A − λI) = (6 − λ)(3 − λ) − (2)(2).


det(A − λI) = λ2 − 9λ + 14.

Solving:
λ2 − 9λ + 14 = 0.
Factoring:
(λ − 7)(λ − 2) = 0.
Thus, the eigenvalues are:

λ1 = 7, λ2 = 2.
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Solution, cont...

det(A − λI) = (6 − λ)(3 − λ) − (2)(2).


det(A − λI) = λ2 − 9λ + 14.

Solving:
λ2 − 9λ + 14 = 0.
Factoring:
(λ − 7)(λ − 2) = 0.
Thus, the eigenvalues are:

λ1 = 7, λ2 = 2.
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Solution, cont...
Eigenvectors for λ1 = 7
Substitute λ1 = 7 into A − λ1 I:
   
6−7 2 −1 2
A − 7I = = .
2 3−7 2 −4

 − 7I)v
Solve (A  = 0, where
   
x −1 2 x 0
v= :⇒ = .
y 2 −4 y 0
System of equations:

−1x + 2y = 0 =⇒ x = 2y.
 
2
Let y = 1, then x = 2. The eigenvector is: v1 = .
1
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Solution, cont...
Eigenvectors for λ1 = 7
Substitute λ1 = 7 into A − λ1 I:
   
6−7 2 −1 2
A − 7I = = .
2 3−7 2 −4

 − 7I)v
Solve (A  = 0, where
   
x −1 2 x 0
v= :⇒ = .
y 2 −4 y 0
System of equations:

−1x + 2y = 0 =⇒ x = 2y.
 
2
Let y = 1, then x = 2. The eigenvector is: v1 = .
1
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Solution, cont...
Eigenvectors for λ2 = 2
Substitute λ2 = 2 into A − λ2 I:
   
6−2 2 4 2
A − 2I = = .
2 3−2 2 1
 
x
Solve (A − 2I)v = 0, where v = :
y
    
4 2 x 0
= .
2 1 y 0
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Solution, cont...
System of equations: 4x + 2y = 0 =⇒ y = −2x.  
1
Let x = 1, then y = −2. The eigenvector is: v2 = .
−2
Final Answer
The eigenvalues of A are:

λ1 = 7, λ2 = 2.

The corresponding eigenvectors are:


   
2 1
v1 = , v2 = .
1 −2
Introduction to Matrices Matrices Operations Special Matrices Determinants Determinants Eigenvalues and Eigenvectors

Solution, cont...
System of equations: 4x + 2y = 0 =⇒ y = −2x.  
1
Let x = 1, then y = −2. The eigenvector is: v2 = .
−2
Final Answer
The eigenvalues of A are:

λ1 = 7, λ2 = 2.

The corresponding eigenvectors are:


   
2 1
v1 = , v2 = .
1 −2

You might also like