You are on page 1of 12

Chapter : Linear

Equations and Matrices


MATH 202- LINEAR ALGEBRA
University of Antique - Dr. Mary-An U. Magbanua

Introduction
Linear Algebra is a branch of mathematics rich in theory and applications. The study of
linear algebra demands familiarity with algebra, analytic geometry, and trigonometry.

OBJECTIVES:
At end of this module, you should be able to:
1. solve different kinds of linear systems using elimination method.
2. correctly identify different kinds of matrices
3. add and multiply matrices
4. prove the different properties of matrix addition and matrix multiplication
5. solve linear systems using Gauss-Jordan Reduction Method
6. nd the inverse of the matrix using different methods

1.1 Linear system

A linear equation in n variables x1, x2, x3 . . . xn has the form


a1x1 + a2 x2 + … + an xn = b. The coef cients a1, a2, a3, …, an are real numbers, and the
constant term b is a real number. The number a1 is the leading coef cient, and x1 is the
leading variable.
Linear equations have no products or roots of variables and no variables involved in
trigonometric, exponential, or logarithmic functions. Variables appear only to the rst power.
The following are not linear equations. Why not? The following are linear
2
1. x − 1 = 0 1. 3x + 2y = 7
4
2. x + y + z = 9 2. x1 − 2x2 + 10x3 + x4 = 0
1
3. sin(x) − y + z = 3 3. x + y − πz = 2
2 π
4. e x − 2y = 4 4. (sin )x1 − 4x2 = e 2
2

UNIVERSITY OF ANTIQUE - DR. MAGBANUA 1


fi
1
fi
fi
fi
A set of linear equations is called a linear system.
The following is a linear system of three simultaneous equations with three unknowns x, y,
and z.
x + 2y − 3z = 3
2x − y − z = 11
3x + 2y + z = − 5

In general, a linear system m equations in n unknowns x1, x2, x3 . . . xn is written


mathematically as
a11x1 + a12 x2 + … + a1n xn = b1
a21x1 + a22 x2 + … + a2n xn = b2
a31x1 + a32 x2 + … + a3n xn = b3

am1x1 + am2 x2 + … + amn xn = bm
where the coef cients aij and bj represents real numbers. The unknown x1, x2, x3 . . . xn are
placeholders for real numbers. This is also referred to as m x n linear system.

A solution of a system of linear equations is a sequence of numbers s1, s2, s3, …, sn that
is a solution of each of the linear equations in the system.
It is possible for a system of linear equations to have exactly one solutions, an in nite
number of solutions, or no solution. A system of linear equation is called consistent if it has
at least one solution and inconsistent if it has no solution.

The graph below represents the three possible solutions to a linear system with two
unknowns.

UNIVERSITY OF ANTIQUE - DR. MAGBANUA 2


fi
fi
Solving a System of Linear Equations
You have learned before that there are variety of methods for nding solutions of
linear systems. One can use algebraic method through elimination or substitution. Another is
geometrical method by graphing the equation. However, in this lesson we will be focusing only
for nding solution using elimination.

Steps in using elimination method involving two unknowns.


1. Multiply each equation by a suitable number so that the two equations have same leading
coef cient. This step is no longer applicable if both have same leading coef cients (in any
unknown variable). Proceed directly to step 2.
2. Subtract the second equation from the rst.
3. Solve the new equation for the variable left.
4. Substitute that variable in (3) into one of the original equation

The steps for more than 2 unknowns can be done by repeating steps 1 to 3 using
combination of equations to generate separate equations having 2 unknowns left to solve one
of the variables and substitute backward to the equations generated upon elimination. Let us
work out these steps in the example that follows.

{4x + 6y = 9 (2)
2x + 3y = 6 (1)
Example 1. Solve the linear system

{4x + 6y = 9 ⇒ 4x + 6y = 9
2(2x + 3y = 6) ⇒ 4x + 6y = 12 Multiply (1) by 2
Step 1. Multiply (1) by 2
(2)

4x + 6y = 12
−(4x + 6y = 9)
Step 2. Subtract the second equation from the rst.
0+0=3
Step 3. Solve the new equation for the variable left. We have no variable left, how can we
have 0 = 3? This means that the system has no solution and is an inconsistent.

{3x + 2y = 7 (2)
2x + 3y = 8 (1)
Example 2. Solve

{2(3x + 2y = 7) → 6x + 4y = 14 Multiply (2) by 2


3(2x + 3y = 8) → 6x + 9y = 24 Multiply (1) by 3
Step 1. Multiply (1) by 3 and (2) by 2

6x + 9y = 24
−(6x + 4y = 14)
Step 2. Subtract the second equation from the rst.
5y = 10

UNIVERSITY OF ANTIQUE - DR. MAGBANUA 3


fi
fi
fi
fi
fi
fi
fi
Step 3. Solve the new equation for the variable left. 5y = 10 → y =2
Step 4. Substitute that variable in (3) into one of the original equation. Substitute y = 2 into
either (1) or (2). We will use (1)

2x + 3(2) = 8
2x + 6 = 8
2x = 8 − 6
2x = 2
x =1
Solution: x = 1, y = 2 , or (1, 2).
This system has exactly one solution and is called consistent.

1.2 Matrices
Matrices are rectangular arrays of scalars (A scalar is a complex number unless otherwise
stated) that are used in a great variety of ways, such as to solve linear systems, model linear
behavior, and approximate nonlinear behavior. It is surrounded by a pair of brackets. Each
has rows and columns and this de nes the size of the matrix. If a matrix [ A] has m rows n
columns, the size of the matrix is denoted by “mxn”. The matrix [ A] may also be denoted by
[ A]m xn to show that [ A] is a matrix with m row and n column.

Matrices are often identi ed with italized or bold capital letters. So A, B, C or A, B, C can
be used as labels to identify matrices. The corresponding small letter is used to identify
individual elements of the matrix, with subscripts indicating the row and column where term
is located.
2 1
[−1 5 0] [ 1 + i] [3 1 ]
3 −2 4 i
[3 7i 0] 0 −1

a11 a12 … a1n


a21 a22 … a2n
The general form of a matrix is A =
⋮ ⋮ … ⋮
am1 am2 … amn

Elements of the Matrix


Each entry in the matrix is called the entry or element of the matrix and is denoted by aij;
where the “i” is the row number and “j” is the column number of the element.

UNIVERSITY OF ANTIQUE - DR. MAGBANUA 4


fi
fi
Rows and Columns
The elements in a horizontal line are called rows and the elements in a vertical line are
called columns.
The numbers of rows and columns as de nes the dimensions of the matrix (m x n),
which is read as “r by c”.

Kinds of Matrices
Rectangular matrix is a matrix with the number of row and columns are not equal.

Square matrix is a matrix with the number of rows equals the number of columns.

A square matrix has two diagonals — Upper Triangular and Lower Triangular. Upper
diagonal extending from the upper left hand corner to the lower right-hand corner. It is called
principal diagonal or main diagonal and its elements are called diagonal elements.
Upper Triangular Matrix is a matrix, in which all the elements below the
diagonal entries are zero.
a11 a12 a13
0 a22 a23
0 0 a33
Lower Triangular Matrix is a matrix, in which all the elements above the
diagonal entries are zero.
a11 0 0
a21 a22 0
a31 a32 a33
Diagonal Matrix is a square matrix with all non-diagonal elements equal to
zero.
a11 0 0
0 a22 0
0 0 a33
Unit Matrix or Identity Matrix is a square matrix with all diagonal elements
equal to one and non-diagonal elements are equal to zero.
1 0 0
[0 0 1]
0 1 0

UNIVERSITY OF ANTIQUE - DR. MAGBANUA 5


fi
Null Matrix or Zero Matrix is a matrix (square or rectangular), where every
elements of which is zero.
0 0 0
[0 0 0]
0 0 0

Special Types of Matrix


Row Vector or Row Matrix is a matrix that consists of just one row and any number of
columns.
[u1 u2 … un]
Column Vector or Column Matrix is a matrix that consists of single column and any
number of rows.
v1
v2

vn
Augmented and Coef cient Matrix
A matrix that includes the entire linear system is called an augmented matrix.
We can also make a matrix that is made up only of the coef cients that multiply the
unknown variables. This is known as the coef cient matrix.
1 4 7 5
Example 3. The element located at row 2 and column 3 of this matrix B = 0 2 −1 3
8 17 21 6
is indicated by writing (2, 3) or b23. This number is b23 = − 1.

5x − y + 9z = 2
Example 4. This linear system 4x + 2y − z = 18 have the following augmented and
x + y + 3z = 6
5 −1 9
coef cient matrix. coef cient matrix of the linear system A = 4 2 −1
1 1 3
5 −1 9 ⋮ 2
augmented matrix is A = 4 2 −1 ⋮ 18 .
1 1 3 ⋮ 6
The dash line before the coef cients of the bis can be eliminated or a space is applicable
5 −1 9 2
and can be written this way A = 4 2 −1 18 .
1 1 3 6

UNIVERSITY OF ANTIQUE - DR. MAGBANUA 6


fi
fi
fi
fi
fi
fi
1.3 Matrix Addition and Matrix Multiplication
Two m x n matrices A and B are equal is they have the same number of rows and
columns and their corresponding entries are equal and can be written as A=B.

1.3.1 Addition and Scalar Multiplication


Addition and Scalar Multiplication. If A and B are two m x n matrices, then the sum of the
matrices A + B is the m x n matrix with the i jterm given by aij + bij. The scalar product of the matrix
A with a real number c, denoted by cA, is the m x n matrix with the i jterm given by caij.
2 0 1
Example 5. Perform the operations on the matrices A = 4 3 −1 and
−3 6 5
−2 3 −1
[ ]
B= 3 5 6 a) A + B b) 2A - 3B
4 2 1
Solution:
2 0 1 −2 3 −1 2 + (−2) 0 + 3 1 + (−1) 0 3 0
[ ]
a) A + B= 4 3 −1 + 3 5 6 = 4+3 3 + 5 −1 + 6 = 7 8 5
−3 6 5 4 2 1 −3 + 4 6 + 2 5+1 1 8 6

2 0 1 −2 3 −1
[ ]
b) 2A - 3B = 2A + (- 3B) = 2 4 3 −1 + (−3) 3 5 6
−3 6 5 4 2 1
4 0 2 6 −9 3 10 −9 5
= 8 6 −2 + −9 −15 −18 = −1 −9 −20
−6 12 10 −12 −6 −3 −18 6 7

Properties of Matrix Addition and Scalar Multiplication


Let A, B and C be m x n matrices and c and d be real numbers.
1. A+B = B+A Commutative property of addition
2. A+(B+C) = (A+B)+C Associative property of addition
3. c(A+B)=cA+cB Distributive property
4. (c+d)A= cA+dA Distributive property
5. c(dA)=(cd)A Associative property of multiplication
6. The m x n matrix with all zero entries, denoted by 0, such that A +0= 0+A=A. The
existence of the Identity matrix
7. For any matrix A, the matrix -A, whose components are the negative of each components
of A, such that A +(-A)= (-A)+A=0. The existence of the Inverse matrix

UNIVERSITY OF ANTIQUE - DR. MAGBANUA 7


Proof. The commutative property of addition:
Let A = [aij] and B = [bij], then using the commutative property of addition of real numbers,
we write A + B = [aij + bij] = [bij + aij] = B + A. Similarly, to prove property#3, use the
distributive property (for real number) of multiplication over addition to write
c(A + B) = [c(aij + bij )] = [caij + cbij ] = cA + cB.

*Be able to prove the other properties as exercises.

1.3.2 Matrix Multiplication.


Dot Product of Vectors
u1 v1
u2 v2
Given two vectors u = and v = the dot product is de ned by
⋮ ⋮
un vn
n


u ⋅ v = u1v1 + u2 v2 + … + un vn = ui vi
i=1
2 −5
[−1] [4]
Example 6. Find the dot product of u = −3 and v = 1

2 −5
[−1] [ 4 ]
Solution: u ⋅ v = (2)(−5) + (−3)(1) + (−1)(4) = − 17 or −3 ⋅ 1 = [−17]

Now, lets multiply a vector and a matrix.

[−2 1 ] [3]
1 −1 1
Example 2. Find the product of B = and v =

[−2 1 ] [3] [(−2)(1) + (1)(3)] [ 1 ]


1 −1 1 (1)(1) + (−1)(3) −2
Solution: Bv = ⋅ = =

Matrix Multiplication. Let A be an m x n matrix and B an n x p matrix; then the product AB


is an m x p matrix. The i j term of AB is the dot product of the ith row vector of A with the jth column
n


vector of B, so that (A B)ij = ai1b1j + ai2 b2 j + … + ain bnj = aik bkj
k=1
Example 7. Find AB and BA using the following matrices

[ 0 1] [−2 1 ]
−1 2 1 −1
A= and B =

UNIVERSITY OF ANTIQUE - DR. MAGBANUA 8


fi
Solution:

[ 0 1] [−2 1 ] [ c d] [g h ]
−1 2 1 −1 a b e f
AB = ⋅ A= and B =

[ 0 1] [−2 1 ] [c d] [g h ] [ ce + dg cf + dh]
−1 2 1 −1 a b e f ae + bg a f + bh
AB = ⋅ AB = ⋅ =

[(0)(−1) + (1)(−2) (0)(−1) + (1)(1) ]


(−1)(1) + (2)(−2) (−1)(−1) + (2)(1)
AB =
*please take note the position of the solution matrix →↓ or you may
follow the steps as shown above.

[−2 1]
−5 3
AB =

[−2 1 ] [ 0 1] [(−2)(−1) + (1)(0) (−2)(2) + (1)(1)] [ 2 −3]


1 −1 −1 2 (1)(−1) + (−1)(0) (1)(2) + (−1)(1) −1 1
BA = ⋅ = =

Example 8. Find AB and BA using the following matrices


3 −2 5
[2 1 −3] [1 3]
1 3 0
A= and B = −1 4 −2
0
Solution:
A B = (2x3) x (3x3)= (2x3). The solution of the product of the matrices therefore is a 2x3
matrix. Let us nd the product.
3 −2 5
[2 1 −3] [−1 4 −2]
1 3 0
AB = ⋅
1 0 3
2x3 3x3 = 2 x3

[(2)(3) + (1)(−1) + (−3)(1) (2)(−2) + (1)(4) + (−3)(0) (2)(5) + (1)(−2) + (−3)(3)]


(1)(3) + (3)(−1) + (0)(1) (1)(−2) + (3)(4) + (0)(0) (1)(5) + (3)(−2) + (0)(3)
AB =

[2 0 −1]
0 10 −1
AB =
2x3
BA = (3x3) x (2x3) cannot be multiplied since the column of the rst matrix is not the
same with the row of the second matrix, thus, the product cannot be determined.

*Note: Noticed that matrix product is non-commutative or A B ≠ BA.

UNIVERSITY OF ANTIQUE - DR. MAGBANUA 9


fi
fi
Properties of Matrix Multiplication
Let A, B, and C be matrices (with sizes such that the given matrix products are de ned)
and c is a scalar, then the following properties are true.
1. A(BC)=(AB)C
2. A(B+C)= AB+AC
3. (A+B)C= AC+BC
4. c(AB)= (cA)B= A(cB)

Proof
Show that the matrices A(B+C) and AB+AC are equal by showing that their
corresponding entries are equal. Assume A has size m x n, B has size n xp, and C has size n xp.
Using the de nition of matrix multiplication, the entry in the ith row and jth column of
A(B+C) is ai1(bij + cij ) + … + ain(bnj + cnj ). Moreover, the entry in the ith row and jth
column of AB+AC is (ai1b1j + … + ain bnj ) + (ai1c1j + … + aincnj ). By distributing and
regrouping, you can see that these two i jth entries are equal. thus, A(B+C)= AB+AC.

* what happens when a matrix is multiplied to an identity matrix?


* How about multiplying a matrix to itself, what happens with the solution as the exponent increases?

1.4 Transpose of a Matrix


The transpose of a matrix is formed by writing its column as rows. For instance, if A is
a11 a12 a13 … a1n
a21 a22 a23 … a2n
the m x n matrix shown by A = a31 a32 a33 … a3n then the transpose, denoted by
⋮ ⋮ ⋮ … ⋮
am1 am2 am3 … amn
a11 a21 a31 … am1
a12 a22 a32 … am2
A , is the n x m matrix A = a13
T T a23 a33 … am3
⋮ ⋮ ⋮ … ⋮
a1n a2n a3n … amn

Example 9. Find the transpose of each matrix.


1 2 3 1 2 0 0 1
[8] [0 0 1] [1 −1]
2
a) A = b) B = 4 5 6 c) C = 2 1 0 d) D = 2 4
7 8 9

UNIVERSITY OF ANTIQUE - DR. MAGBANUA 10


fi
fi
Solution:
1 4 7
T T
a) A = [ 2 8] b) B = 2 5 8
3 6 9

1 2 0
[0 0 1] [1 4 −1]
T 0 2 1
c) C = 2 1 0 d) DT =

[3 4] [1 −1]
1 2 3 5
Example 10. Let A = and B = . Calculate (A B)T, A T B T, and B T A T.

*Make a conjecture about the transpose of a product of two square matrices. Select two other
square matrices to check your conjecture.

Properties of the Transpose Properties of the Transpose


Suppose A and B are m x n matrices, C is an n xp matrix, and c is a scalar
1. (A + B)T = A T + B T
2. (AC )T = C T A T
3. (A T )T = A
4. (cA)T = cA T

Proof. We start by showing that the products involved are all de ned. Since AC is m xp, then
(AC )T is px m. As C T is px n and A T is m x n, then C T A T is also px m. So the sizes of the
products agree. Now to show that the products are equal, we apply the de nitions of
multiplication and transpose to obtain
N
(C T A T )ij = (C T )ik (A T )kj

k=1

n n

∑ ∑
cki ajk = ajk cki = (AC )ji
k=1 k=1

((AC )T )ij

Symmetric Matrix. An n x n matrix is symmetric provided that A T = A

Example 11. Find all 2x2 matrices that are symmetric.

[ 21 a22]
a11 a12
Solution: Let A = a . Then A is symmetric if and only if

UNIVERSITY OF ANTIQUE - DR. MAGBANUA 11


fi
fi
[ 21 a22] [a12 a22]
a11 a12 a11 a21
A= a = = A T which holds if and only if a12 = a21. So a 2x2 matrix is

[ 12 a22]
a11 a12
symmetric if and only if the matrix has the form a .

Exercises 01-04
1. Which of the following equations are linear and not linear equations?
A. x − y − z = 3 F. x = 3y
−b ± b 2 − 4ac
B. x +y +z =6 G. x =
2a
C. cos(x) + sin(y) = 1 H. π x + y + ez = 5
1
D. e x+y+z = 1 I. 2x + y + z = 0
2
E. x = 2y + 5z = 3 J. sinh (x) = ln | x + x 2 + 1 |
−1

2. Solve the following system by elimination.


x +y +z =3
{x − y = 0
x +y =2
A. B. x−y−z =−1
2x + y + 5z = 8

3. Using elimination method, how would you know that a system has exactly one solution?
in nitely many solution? no solution?

4. Write the following systems into an augmented and coef cient matrices
x +y +z =3
{x − y = 0
x +y =2
A. B. x−y−z =−1
2x + y + 5z = 8

5. Describe how are the following matrices look like and give example, a) diagonal matrix, b)
triangular matrix (upper or lower), c) echelon matrix, d) reduced row echelon matrix, and e)
identity matrix.
6. Perform the operations on the matrices
−3 1
[−1 5] [ 2 5 −3 1] [1 6 −2 4]
−1 1 −1 3 3 2 −2 1
A= 2 2 B= C=

a. A(2B-3C) b. AB + AC c. ABT d. (AB)T

UNIVERSITY OF ANTIQUE - DR. MAGBANUA 12


fi
fi

You might also like