2. Group Member
FARHAN AMJAD (FA21-
BCS-005)
MUNEEB ANWAR (
FA21-BCS-008)
BILAL AHMAD (FA21-
BCS-014)
MUHAMMAD
USMAN(FA21-BCS-020)
3. Agenda
• System of Linear Equations
• Matrices and Types of Matrices
• Linear Combination
• Matrix Multiplication and Matrix-
Vector Product
• Partitioned Matrices and Matrix
Transformation
• Elementary Row Operations
• Row Reduced Echelon Form
(RREF) and Row Echelon Form
(REF)
• Gaussian Elimination Method and
Gauss-Jordan Reduction
5. Number System
• Natural Number N = {1,2,3,4,5,…..}
• Whole Number W = {0,1,2,3,4,….}
• Integer Number ℤ = {0, ±1, ±2, ±3, ….}
• Rational Number Q = p/q , q≠0, p, q∈ ℤ
• Irrational Number Q’ ≠ p/q
• Real Number ℝ = Q U Q’
N ⊂ W ⊂ ℤ ⊂ Q ⊂ Q’ ⊂ ℝ
6. Linear Equation
A linear equation is a
mathematical expression that
represents a straight line on a
graph. It consists of variables
raised to the power of 1, and
the relationship between the
variables is such that when
plotted on a graph, it forms a
straight line.
Linear Equation
2x+y = 3
7. System of Linear Equation
• A system of linear equations is a group of equations where each equation
represents a straight line when graphed.
• These equations have variables (like x and y) and numbers.
• The goal is to find the values of the variables that make all the equations true
at the same time.
• Example
One Variable Two Variable Three Variable
2x=1 2x+3y=1
-x+y=2
x-2y+z=-4
2x-3y+2z=-6
2x+2y+z=5
10. EXAMPLE
Consider
x + 2y = 10…….(1)
5x + y = 14………(2)
A solution to a system of linear equations
is a pair of numbers for x and y that
makes both equations true. The solution
to the above system of linear equations
is x = 2 and y = 4. These values
for x and y make both equations true.
(Unique solution)
12. EXAMPLE
Consider
4x – y = 1…….(1)
-8x + 2y = 4………(2)
When we multiply equation (1) by 2, we
get the following result for the equation
(1) to (2):
8x – 2y = 2 … (3)
As equations (2) and (3) are similar,
adding them will result in the answer "0.“
0=non zero (no solution)
13. Method to Solve
Linear System
There are many methods to solve linear
systems, but we will discuss two of them:
1. Substitution method
2. Elimination method
14. 2x+3y=11
4x-2y=2
Substitution Method:
• We can solve one of the
equations for one variable and
then substitute this expression
into the other equation.
Elimination Method:
• We can add or subtract the
equations in such a way that
one of the variables is
eliminated when we add or
subtract the equations.
16. Matrices
• A matrix is a group of real or complex numbers arranged in rows and columns. If a matrix has m rows
and n columns, it's called an "m by n" matrix, written as "m × n.“
17. Types of Matrices
Row Matrix:
A matrix with a single row can
be represented as A = [aij]1Xn,
where i = 1 and j = 1, 2,...., n.
18. Types of Matrices
Column Matrix:
A matrix with a single column
can be represented as A =
[aij]mX1, where i = 1,2,….,m and
j = 1.
19. Types of Matrices
Square Matrix:
A matrix with a same number of
the row and column can be
represented as A = [aij]nXn, where
I,j = 1,2,….,n.
20. Types of Matrices
Diagonal Matrix:
A square matrix A = [aij] for which
all the terms off the main diagonal
are zero that is aij =0 for if i ≠ j is
called diagonal matrix.
21. Types of Matrices
Scalar Matrix:
A diagonal matrix A = [aij] for which all the
terms on the main diagonal are equal that
is aij =c for i=j and aij=0 for i ≠ j is called
scalar matrix.
22. Types of Matrices
Identity Matrix:
A Scalar matrix A = [aij] for which all the
terms on the main diagonal are equal that
is aij =1 for i=j and aij=0 for i ≠ j is called
Identity matrix.
23. Operation on Matrices
There are many operations that are performed on matrices. We can see some of
them.
• Matrix Addition
• Matrix Subtraction
• Matric Multiplication
• Scalar Multiplication
• Transpose of Matrix
24. Matrix Transpose
• Creating a new
matrix where the
rows of the
original matrix
become the
columns, and
vice versa.
25. Matrix Addition
Matrix addition follows these rules:
• Matrices must have the same dimensions (same number
of rows and columns) to be added together.
• Addition is performed by adding corresponding elements
of the matrices.
• The resulting matrix will have the same dimensions as the
original matrices being added.
27. Matrix Subtraction
Matrix subtraction follows these rules:
1. Matrices must have the same dimensions (same number
of rows and columns) to be subtracted.
2. Subtraction is performed by subtracting corresponding
elements of the matrices.
3. The resulting matrix will have the same dimensions as the
original matrices being subtracted.
29. Scalar Multiplication
Scalar multiplication refers to the
operation of multiplying every
element of a matrix by a single
scalar (a real or complex number).
In scalar multiplication, each
element of the matrix is multiplied
by the same scalar value. The
resulting matrix has the same
dimensions as the original matrix.
30. Matrix Multiplication
The number of columns in the first
matrix must be equal to the
number of rows in the second
matrix for multiplication to be
possible.
The resulting matrix will have
dimensions equal to the number of
rows of the first matrix and the
number of columns of the second
matrix.
33. Linear Combination
If A1, A2, A3, ..., Ak are matrices
with dimensions m × n, and c1, c2,
c3, ..., ck are real numbers, then
an expression like c1A1 + c2A2 +
c3A3 + ... + ckAk is termed as the
linear combination of A1, A2, A3,
..., Ak. Here, c1, c2, c3, ..., ck are
referred to as coefficients.
Example:
is the matrix of
34. Dot product
The dot product or inner product of the n-vectors a and b is the sum of the
products of corresponding entries.
Note that for a dot product to be defined, both vectors must have the same number
of elements.
If u&v are vectors, then uTv=u.v
35. Matrix Vector Product
Matrix-vector product refers to the operation of multiplying a matrix by a vector. In
this operation, each row of the matrix is multiplied element-wise by the
corresponding element of the vector, and the results are summed up to produce a
new vector.
The resulting vector has the same number of rows as the original matrix and is
obtained by multiplying each row of the matrix by the vector and summing the
results.
For example, if we have an m × n matrix A and a vector v of size n, the matrix-
vector product Av is a vector of size m. Each element of Av is obtained by taking
the dot product of the corresponding row of A and the vector v.
37. Partitioned matrices
Partitioned multiplication, also known as block matrix multiplication, is performed
according to the following rules:
1.Partitioning: Divide each matrix into smaller submatrices or blocks. These
blocks can be of any size, but they must be compatible for multiplication.
2.Multiplication of Blocks: Multiply corresponding blocks of the matrices
according to standard matrix multiplication rules.
3.Addition of Results: Sum the products of the individual block multiplications to
obtain the final result.
4.Compatibility: Ensure that the dimensions of the blocks allow for valid matrix
multiplication. Specifically, the number of columns in the left block must match the
number of rows in the corresponding block on the right.
39. Matrix Transformation
If A is an m x n matrix and u is an n-vector, then the matrix product Au is an m-
vector. A function of mapping 𝑅𝑛
→𝑅𝑚
defined by f(u) = Au.
The vector f(u) in 𝑅𝑚 is called the image of u, and the set of all images of the
vectors in 𝑅𝑛 is called the range of f .
41. Contraction and Dilation
2 0 0
0 2 0
0 0 2
When r=2 we solve it. If we compare A(u) with f(u), the f(u) will always be
greater. This case is Dilation.
0.5 0 0
0 0.5 0
0 0 0.5
When r=0.5 we solve it. If we compare A(u) with f(u), the f(u) will always be
less. This case is Contraction.
42. Elementary Row Operation
• Interchange of tow Rows
• Multiply a row by any non-zero number
• Add a multiple (non-zero) of any row to any other row
43. Row Reduced Echelon Form
• All zero rows, if there are any, appear at the bottom of the
matrix .
• The first nonzero entry from the left of a nonzero row is a l.
This entry is called a leading one o f its row.
• For each nonzero row. the leading one appears to the right
and below any leading ones in preceding rows.
• If a column contains a leading one, then all other entries in
that column are zero .