Linear Equations and Matrices (Week 1-3)
Linear Equations and Matrices (Week 1-3)
Equation
Learning Objectives
1. Write, recognize and to be familiarized with the
system of m linear equations in n variables.
2. State and define the linear equation in n variables.
3. Find the solution set of a linear equation.
4. Identify the solution of a system of linear
equations whether it is consistent or inconsistent.
5. Solve the system of linear equation using
substitution, elimination, elimination by
substitution, back-substitution and Gauss
elimination method.
In Analytical Geometry, we studied the
two-dimensional space demoted as .
Example:
Similarly, the equation of a
plane in three-dimensional
space denoted by .
Definition of
Linear
Equation in
n Variables
In general, the definition of a linear equation in
n-variables is that:
A linear equation in n
variables x1, x2, x3, …, xn is in the form of:
Note: The set of all solutions of a linear equation is called its solution
set, and when you have found this set, you have solved the equation. To
describe the entire solution set of a linear equation, use a parametric
representation.
Example 2:
Example for Parametric Representation of a Solution Set
x2 = 2 – 1/2x1. If x1 = s then
x2 = 2 – 1/2s where s is any real
number.
Note: For convenience, choose the variables that occur last in
a given equation to be free variables.
Example 3:
System of Linear
Equation
1.1 System of Linear Equations
A system of m linear equations in n variables
is written in the following form:
(a) No solution.
(b) Unique solution.
(c) Infinitely many solutions
(eq. 1)
(eq. 2)
Example 2: Unique
Solution
(eq. 1)
(eq. 2)
(eq. 3)
Example 3: Infinite (Many)
Solution
(eq. 1)
(eq. 2)
Example 4: Infinite (Many)
Solution
(eq. 1)
(eq. 2)
Example 5: No
Solution
(eq. 1)
(eq. 2)
Example 6: No
Solution
(eq. 1)
(eq. 2)
(eq. 3)
Solving System of
Linear Equations
Using
Back-Substitution in
Row-Echelon Form
Another method in solving system of
linear equations is with the use of so called
“Back-substitution in Row-Echelon Form”. The
row-echelon form is as like as a “stair-step”
pattern with leading coefficients of 1.
Let us take a look two sets of system of
linear equation and try to analyse.
x – 2y + 3z = 9 x – 2y + 3z = 9
-x + 3y = -4 y + 3z = 5
2x – 5y + 5z = 17 z=2
Rewriting a system of linear equations in row-echelon
form usually involves a chain of equivalent systems, each of
which is obtained by using one of the three basic operations.
This process is called Gaussian elimination, after the
German mathematicians Carl Friedrich Gauss (1777-
1855).
What would be the operations that produce
equivalent system? Each of the following operations on a
system of linear equations produces an equivalent system.
2. Usually, the constant served as the given in the problem and the
required quantities served as the unknown or the variables. Use
appropriate or meaningful variables for a particular worded
problems.
3. If necessary, draw the figures, diagrams or even tables so that
you could write the relevant information for the constant and
variables that could be translated into correct equation.
4. From 3, write the equations based on what is stated in the problem.
5. On this stage, solve the system of linear equations.
6. Last, you need to check the solved quantity or quantities if it will
match on the equations.
Example 1:
A carpenter purchased 60 ft of
redwood and 80 ft of pine for a total
cost of Php 286. A second purchase,
at the same prices, included 100 ft of
redwood and 60 ft of pine for a total
cost of Php 396. Find the cost per
foot of redwood and of pine.
The given information may be tabulated as follows:
1. Define matrix.
2. Determine the size of a matrix.
3. Determine the different kinds
of a matrix.
4. Perform matrix operation.
A matrix is a rectangular array of numbers in the form
column 1 column 2 column n
a11 a12 … a1n Row 1
b)
This is a 3 x 1 matrix since there are 3-row and 1-column. The a 11 = 2, a21 = -4 and
the a31 = 3. This is known as a column matrix.
[ 𝐚 𝟏𝟏 𝐚 𝟏𝟐 𝐚 𝟏𝟑 … . 𝐚 𝟏 𝐧 ]
( ) ( )
𝟑 𝟎 𝟒 𝟎 𝟎
𝟎 𝟐 𝟎
𝟎 𝟓
𝟎 𝟎 −𝟑
Scalar matrix
– a diagonal matrix for which all terms
on the main diagonal are equal.
( ) ( )
𝟑 𝟎 𝟐 𝟎 𝟎
𝟎 𝟑 𝟎 𝟐 𝟎
𝟎 𝟎 𝟐
Equal matrix
if x = 3, y = 0 and z = 3
Zero matrix
– any m x n matrix that all elements are
entirely having zero entries.
( ) ( )
𝟎 𝟎 𝟎 𝟎 𝟎
𝟎 𝟎 𝟎 𝟎 𝟎
𝟎 𝟎 𝟎
Identity matrix
– square matrix whose elements in the
main diagonal are all one and for which
every term off the main diagonal is
zero.
( ) ( )
𝟏 𝟎 𝟏 𝟎 𝟎
𝟎 𝟏 𝟎 𝟏 𝟎
𝟎 𝟎 𝟏
Coefficient matrix
-matrix containing only the coefficient of the system.
Illustration:
Let the system of linear equations would be:
2x – 3y + z = 5 (1)
-4x + 2y – 2z = 6 (2)
4x – 3y + 3z = -2 (3)
( )
Then the coefficient matrix is; 𝟐 −𝟑 𝟏
−𝟒 𝟐 −𝟐
𝟒 −𝟑 𝟑
Constant matrix
-a matrix in which all the entries are constants.
If all the entries are the same constant k,
multiplication by the matrix, when it can be done, is
equivalent to multiplication by the scalar k and by a
matrix of the same order in which all entries are 1.
Illustration:
=2
Leading matrix
-matrix where constant is adjoining to the coefficient matrix.
Illustration:
( )
𝟐 − 𝟑 𝟏
𝟎 𝟐 𝟎
𝟒 𝟎 𝟑
Illustration:
Let the system of linear equations would be:
2x – 3y + z = 5 (1)
-4x + 2y – 2z = 6 (2)
4x – 3y + 3z = -2 (3)
( )
Then the coefficient matrix is; 𝟐 −𝟑 𝟏
−𝟒 𝟐 −𝟐
𝟒 −𝟑 𝟑
Matrix
Operations
Matrix Addition and Subtraction
Illustration:
Illustration:
Illustration:
Let A = and B =
A+B = B +A
+ = +
=
Property 2. Associative Property of Addition
Let A, B and C are matrices with the same size, then (A + B) + C
= A + (B + C)
Illustration:
Let A = , B = and C =
A + (B + C) = (A + B) + C
= +
+ = +
=
Property 3. Associative Property of Scalar Multiplication
Let A be a matrix and c and d are scalars then (cd)A = c(dA).
Illustration:
Let matrix A be and scalar a and b be 2 and 3 respectively.
(ab)A = a(bA)
(23) = 2 3
6 = 2 =
Property 4. Multiplicative Identity
Let A be a matrix and 1 be an Identity Matrix, then 1A = A.
Illustration:
Let matrix A be a square matrix and I be the identity
matrix.
Say A = and I = .
IA = A
=
=
=
Property 5. Distributive Property
Let A and B are two matrices with the same size and c is a scalar,
then c(A + B) = cA + cB.
Illustration:
Illustration:
Let c and d be two scalars whose value is 3 and 2 respectively and a
matrix A = . Show that (c + d)A = cA + dA.
(c + d)A = cA + dA
(3 + 2) = 3 + 2
5 = +
Properties of Zero
Matrix
Property 1
Let A be an m x n matrix and O be an m x n zero matrix, then A + 0mn = A.
Note that any given matrix added to zero matrix, they must be on the same size.
Illustration:
Let A = and O = , so
A+O= + = =A
Property 2
Let A be an m x n matrix ,then A + (-A) = 0mn.
Illustration:
Let A = and –A = -1 =
A + (-A) = +
= =O
Property 3
Let A be an m x n matrix and c is a scalar. If cA = 0mn, then
c = 0 or A = 0mn
Illustration:
Let c = 0 and A = .
0 =
Properties of Matrix
Multiplication
Property 1. Associative Property of Multiplication
Let A, B and C are matrices (with sizes such that the given matrix products are defined),
then A(BC) = (AB)C.
Illustration:
Let A be a 3 x 2 matrix, B is 2 x 3 and C is 3 x3
A = ; B = and C = .
=
=
=
Property 2. Distributive Property
Let A, B and C are matrices (with sizes such that the given matrix products are defined),
then A(B + C) = AB + AC and (A + B)C = AC + BC.
Illustration:
Let A = , B = and C = ,
= +
= +
=
Property 3
Let A and B are matrices (with sizes such that the given matrix products are defined) and c is
scalar then c(AB) = (cA)(B) = A(cB).
Illustration:
Let A = and B = where scalar c = 2.
We need to show that c(AB) = (cA)(B) = A(cB).
2= =
= =
Properties of
Transpose
Property 1. Transpose of a Matrix
Illustration:
Let a matrix A be .
AT = .
(AT)T = = A.
Property 1. Transpose of a Sum
Let A and B are two matrices with the same size, then (A + B) T = AT + BT.
Illustration:
Let matrix A and B be and . We need to show that (A + B)T = AT + BT.
On the left side of an equation, you need to determine the sum of A and B, thus
+ =.
Taking the transpose of this,
(A + B)T =
Performing the right side of an equation, taking the transpose of A and B. And following
the property of a transpose of a matrix, we get
AT = and BT = .
Adding this two, we get
+=.
Property 3. Transpose of a Scalar Multiple
Illustration:
=5
=
Property 4. Transpose of a Product
Let A and B are matrices (with sizes such that the given matrix operations
are defined), then (AB)T = BTAT.
Illustration:
Let A = and B = .
We need to show that (AB)T = BTAT.
(AB)T = = = .
Then working onthe right member of an equation for BTAT, we
have;
BT = and AT = .
Now, the product of these two transpose of a matrix is
=.
=
Reduced Row
Echelon Form
Definition:
In order to say that an m x n matrix is in what we
called an echelon form, the following properties must be
satisfied:
Solution:
( )
1/2R1 R1 1 -4R2 + 4
R1 R1 2
0 1 1
6R2 + R3 R3
0 − 6 −9
( ) )
1 0 − 2
(
1 4 2
-2R1 + R2 R2 0 -1/3R3 1
R3 1
2 5
-4R1 + R3 R3
1
0 0 − 3
( ) )
4 10 −1 1 R1 R1
2R3 + 0 − 2
(
1 4 20 -1R3 + 1R2 R2 1
0 1/3R
− 2 R
3 −0 3
2
0 1
0 − 6 −𝟏 9
( )
𝟎 𝟎
𝟎 𝟏 𝟎
𝟎 𝟎 𝟏
Transform the given matrix, say A = . Row 1
Row 2
Row 3
Row 4
Gauss-Jordan
Reduction
Special method that involves systematically
eliminating variables from equations.
Procedures in solving linear system by Gauss-Jordan
Reduction
1. Write the linear system in augmented matrix.
2. Obtain the reduced row echelon form of the
augmented matrix by applying the elementary
row operations.
3. The reduced row echelon form of the augmented
matrix gives the solution to the linear
system.
A matrix is considered in reduced row echelon form if it
satisfies the following properties:
2x – y = -1
2x + y = -7
Answer:
x – w = -14, y = -1 and z + 2w = 8
Example 5:
2x – 3y = 1
-4x + 6y = 8
x + 2y + 3z = 0
-x + 3y + 2z = 0
2x + y – 2z = 0
x=y=z=0
The HS has trivial solution
Example 2:
x–z=0
y + 2z = 0
The HS has nontrivial solution.
The Inverse of
a Matrix
The inverse of a square n × n matrix A, is another
n × n matrix denoted by A−1 such that AA−1 = A−1A =
I where I is the n × n identity matrix. That is,
multiplying a matrix by its inverse produces an
identity matrix. Note that not all square matrices
have an inverse matrix.
𝐴
−1
=
1 𝑑
𝑎𝑑 − 𝑏𝑐 − 𝑐 ( −𝑏
𝑎 )
Note: The ad – bc is the determinants of the matrix A and is the adjugate adj A of the
matrix A. Lesson about determinants will be discussed on our next module.
Illustration:
A=
B=
2. Finding the inverse of a 2 x 2 matrix
can be done using this matrix equation:
−1
𝐴 𝐴 =𝐼
Where:
A=
B=
3. Gauss Jordan Reduction for finding the
inverse of a matrix.
Let A be a n x n matrix.
Notes:
If the reduced row echelon form is not of the type
[In : A-1 ], then A-1 is the inverse of A.
If the reduced row echelon form is not of the type
[In : A-1 ] and the first n x n sub-matrix is not In , then A has no inverse.
We could also use this method if the size of a matrix is more than 2 x 2
Illustration:
A=
B=
Properties of
Matrix Inverse
Let A and B be invertible matrices and
r be a nonzero scalar. Then
1. (A-1)-1 = A
2. (rA)-1 = (1/r)A-1 ; where r 0
3. (AB)-1 = B-1A-1
4. AA-1 = A-1A = In
5. (AT)-1 = (A-1)T
6. (In)-1 =In
Illustration:
Let ;
B and
I
Application of
Matrix
Operations
PROBLEM 1.
The A-Plus auto parts store chain has two outlets, one in
Vancouver and one in Quebec. Among other things, it sells wiper blades,
windshield cleaning fluid, and floor mats. Use matrix arithmetic to calculate the
changes in sales of each product in each store from January to February. The
monthly sales of these items at the two stores for two months are given in the
following tables:
PROBLEM 2.
The revenue generated by sales in the Vancouver and Quebec
branches of the A-Plus auto parts store was as follows:
If the Canadian dollar was worth $0.65 U.S. at the time, compute the
revenue in U.S. dollars.
PROBLEM 3.
The A-Plus auto parts store mentioned in examples in the previous
section had the following sales in its Vancouver store:
PROBLEM 4.
January sales at the A-Plus auto parts stores in Vancouver and Quebec are
given in the following table.
The usual selling prices for these items are $7.00 each for wiper
blades, $3.00 per bottle for cleaning fluid, and $12.00 each for floor
mats. The discount prices for A-Plus Club members are $6.00 each for
wiper blades, $2.00 per bottle for cleaning fluid, and $10.00 each for
floor mats. Use matrix multiplication to compute the total revenue at
each store, assuming first that all items were sold at the usual prices,
and then that they were all sold at the discount prices.
CRYPTOGRAPHY
Cryptography is a method of protecting information
and communications through the use of codes, so that only
those for whom the information is intended can read and
process it.
Note that the number 27 is for the space if the message is composed of more
that one word.
2. We will assign respective number for the letter of a word or words
which correspond on the given table below.
Example for the word “LOVE”, L is 12, O is 15, V is 22 and E is 5.
Then, we will divide the letter of a word into group of letters you
desired. Say, you will be divided the word LOVE into two groups with
two letters for each group. LO and VE and this will make us a 2 x1
size of matrix.
Example: Let A = . This would be our key to
encrypt the word and the matrix of divided word
would be; = and
( )( ) (
3
1
5
2
12
15
=
)( )
( 3 ) ( 12 )+(5)(15)
( 1 ) (12 )+(2)(15)
=
111
42
( 1 2 )( 5 ) (( 1 ) ( 22 ) +(2)(5)) ( 32 )
3 5 22
=
( 3 ) ( 22 ) +(5)(5)
=
91
( 1 11
42 (
) 91
32 )
To decrypt the secret message, we will be using
the same process but this time, the inverse matrix
would be our key matrix.
= =