1.3) Matrices

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

MATH1350H-A: Linear Algebra 1

Lesson 1.3: Matrices

1 / 17
In this section:

▶ Matrices.
▶ Augmented matrix.
▶ Matrix operations.
▶ Vector form of a solution set.

2 / 17
1.3 Matrices

Definition (Matrix)
An m × n matrix is a rectangular array of numbers with m rows
and n columns. Each number in the matrix is called an entry.

Example
This is a 2 × 3 matrix (read: “two by three matrix”)
 
1 11/5 5
A=
3 4 −7

because is has 2 rows and 3 columns.


▶ Denote the entry in row i and column j by ai,j .
▶ The entry in row 2 and column 1 is a2,1 = 3.
▶ Note: a2,1 ̸= a1,2

3 / 17
Matrices

Definition (Column matrix, row matrix, zero matrix)


▶ A column matrix (or column vector) is a matrix with a single
column. A matrix with a single row is a row matrix (or
row vector). The entries of these are called its components.
▶ A matrix whose entries are all zeros is a zero matrix.

Example
A column matrix with 3 A 2 × 2 zero matrix
components  
  0 0
−2 0 0
 0 
1/2

4 / 17
Matrices

▶ We are going to use matrices to solve systems of linear


equation via Gauss’ method.
▶ Using matrices instead of linear equations cuts down on the
amount of writing.
▶ We will use column matrices to express our solutions in an
efficient way.
▶ Later in the course, we will use matrices in a different way,
when we study vector spaces and linear transformations.

5 / 17
Matrix notation for linear systems

Example
We can abbreviate the linear system
 
x +2y =4 1 2 0 4
y −z =0 with the matrix  0 1 −1 0 
x +2z =4 1 0 2 4

▶ The vertical bar separates the coefficients on the system’s left


hand side and the constants on the right.
▶ Notice that each column to the left of the bar corresponds to
a different variable, preserving the order that they appear
(first column for x, second for y , third for z).
▶ With the bar included, this is called an augmented matrix.
▶ We will put this matrix into row echelon form using Gauss’
method as we did before

6 / 17
Matrix notation for linear systems

Example
 
1 2 0 4
 0 1 −1 0 
1 0 2 4

7 / 17
Matrix notation for linear systems

Example
   
1 2 0 4 1 2 0 4
R −R1
 0 1 −1 0  −−3−−→  0 1 −1 0 
1 0 2 4 0 −2 2 0
 
1 2 0 4 x +2y =4
R +2R2
−−3−−−→  0 1 −1 0  or y −z =0
0 0 0 0 0 =0

▶ The second row stands for y − z = 0.


▶ The first row stands for x + 2y = 4.
▶ Parametrize our solutions with z.
▶ Therefore the solution set is {(4 − 2z, z, z); z ∈ R}

8 / 17
Matrix operations

Definition (Matrix sum)


We form the sum of two m × n matrices by adding the entries
componentwise.
Example
   
1 3 −5 2 0 0
+
0 6 6 2 1 1
   
1 + 2 3 + 0 −5 + 0 3 3 −5
= =
0+2 6+1 6+1 2 7 7

Note: We may only add two matrices of the same size

9 / 17
Matrix operations

Definition (scalar multiplication)


The scalar multiplication of the real number r and a matrix M is
formed by multiplying each entry of M by r .

Example
     
1 4 4×1 4×4 4 16
4 2 1  = 4 × 2 4×1 =8 4 
3 −6 4 × 3 4 × (−6) 12 −24

† we will refer to real numbers as scalars, however the word scalar


has a more general meaning in the context of a vector space.

10 / 17
Matrix (or Vector) form of the solution

Definition
The linear equation a1 x1 + a2 x2 + · · · + an xn = d with unknowns
x1 , . . . , xn is satisfied by the column matrix (or column vector)
 
s1
 s2 
 
 .. 
.
sn

if a1 s1 + a2 s2 + · · · + an sn = d.

It satisfies a linear system if it satisfies each equation in the system.

11 / 17
Matrix (or Vector) form of the solution
Recall from the previous example that
 
1 2 0 4
 0 1 −1 0 
0 0 0 0

has solution set {(4 − 2z, z, z)|z ∈ R}.


▶ By grouping the constants together, and the coefficients of z
together, we can rewrite the solution set as
    
 4 −2 
0 + z  1  z ∈ R
0 1
 

▶ We call this the vector form of a solution, and from now on


we shall require that our solutions be written in this way.

12 / 17
Matrix (or Vector) form of the solution

Example  
−6
Letting z = 5 in the previous example, we see that  5  is one
5
of infinitely many solutions to the system

x +2y =4
y −z =0
x +2z =4

13 / 17
Example

2x +y −w =4
y +w +u =4
x −z +2w =0

14 / 17
Example  
2x +y −w =4 2 1 0 −1 0 4
y +w +u =4 −→  0 1 0 1 1 4 
x −z +2w =0 1 0 −1 2 0 0
 
2 1 0 −1 0 4
R3 −(1/2)R1
−−−−−−−→  0 1 0 1 1 4 
0 −1/2 −1 5/2 0 −2
 
2 1 0 −1 0 4
R3 +(1/2)R2
−−−−−−−→  0 1 0 1 1 4 
0 0 −1 3 1/2 0
Solution set (check):
{(w + (1/2)u, 4 − w − u, 3w + (1/2)u, w , u); w , u ∈ R}.
In
 vector
 form:
      

 x 0 1 1/2 

y 4 −1 −1

         

        
 z  = 0 + w  3  + u 1/2 ; w , u ∈ R
       


 w  0 1  0  


 
u 0 0 1
 

15 / 17
        
x 0 1 1/2
Example

 


 y  4 −1  −1  


       
 z  = 0 + w  3  + u 1/2 ; w , u ∈ R
       


w  0 1  0  


 
u 0 0 1
 

Setting both w and u to zero yields one particular solution:


   
x 0
 y  4
   
 z  = 0
   
w  0
u 0
Setting w = −1 and u = 2 gives another particular solution:
   
x 0
y   3 
   
 z  = −2
   
w  −1
u 2
16 / 17
Summary

Some things we looked at in this section:


▶ Introduced matrices.
▶ Used the augmented matrix as a shorthand notation for
solving a system of linear equations.
▶ Introduced matrix sum and product of a matrix with a scalar.
▶ Used matrix operations to express out solution set in vector
form.

17 / 17

You might also like