3. Matrix Algebra
Matrices are used for other applications besides for
solving systems of equations. For these general
applications, we have to develop matrix algebra.
4. Matrix Algebra
Matrices are used for other applications besides for
solving systems of equations. For these general
applications, we have to develop matrix algebra.
Matrix Notation
5. Matrix Algebra
Matrices are used for other applications besides for
solving systems of equations. For these general
applications, we have to develop matrix algebra.
Matrix Notation
Matrices are rectangular tables of numbers.
6. Matrix Algebra
Matrices are used for other applications besides for
solving systems of equations. For these general
applications, we have to develop matrix algebra.
Matrix Notation
Matrices are rectangular tables of numbers.
A matrix with R rows and C columns is said to be
a size R x C matrix.
7. Matrix Algebra
Matrices are used for other applications besides for
solving systems of equations. For these general
applications, we have to develop matrix algebra.
Matrix Notation
Matrices are rectangular tables of numbers.
A matrix with R rows and C columns is said to be
a size R x C matrix.
is a 3 x 4 matrix.
* * * *
* * * *
* * * *
8. Matrix Algebra
* * * *
Matrices are used for other applications besides for
solving systems of equations. For these general
applications, we have to develop matrix algebra.
Matrix Notation
Matrices are rectangular tables of numbers.
A matrix with R rows and C columns is said to be
a size R x C matrix.
* * * *
* * * *
is a 3 x 4 matrix.
* * * is 1 x 3
9. Matrix Algebra
* * * *
Matrices are used for other applications besides for
solving systems of equations. For these general
applications, we have to develop matrix algebra.
Matrix Notation
Matrices are rectangular tables of numbers.
A matrix with R rows and C columns is said to be
a size R x C matrix.
* * * *
* * * *
is a 3 x 4 matrix.
* * * is 1 x 3 and
*
*
*
is 3 x 1.
11. Matrix Algebra
* * * *
* * * *
* * * *
Hence R3 means the 3rd row
We denote the i'th row as Ri and the j'th column as Cj.
R3
12. Matrix Algebra
* * * *
* * * *
* * * *
Hence R3 means the 3rd row and C2 means the 2nd
column of the matrix.
R3
C2
We denote the i'th row as Ri and the j'th column as Cj.
13. Matrix Algebra
* * * *
We denote the i'th row as Ri and the j'th column as Cj.
* * * *
* * * *
Hence R3 means the 3rd row and C2 means the 2nd
column of the matrix. C2
The entry at the 3rd row, 2nd column is denoted as a32.
a32
R3
14. Matrix Algebra
* * * *
We denote the i'th row as Ri and the j'th column as Cj.
* * * *
* * * *
Hence R3 means the 3rd row and C2 means the 2nd
column of the matrix. C2
The entry at the 3rd row, 2nd column is denoted as a32.
a32
R3
* * * *
* * * *
* * * *
C2
a32
R3
Stage
The numbering system is
the same as the seating
chart in a theatre.
So a32 means
“3rd row 2nd seat”.
15. Matrix Algebra
* * * *
We denote the i'th row as Ri and the j'th column as Cj.
* * * *
* * * *
Hence R3 means the 3rd row and C2 means the 2nd
column of the matrix. C2
The entry at the 3rd row, 2nd column is denoted as a32.
a32
a11 a12 a13 . . . a1C
a21 a22 a23 . . . a2C
. . . . aij . .
. . . . . . .
aR1 aR2 aR3 . . . aRC R x C
So, the general form
of an R x C matrix is:
R3
Stage
16. Matrix Algebra
* * * *
We denote the i'th row as Ri and the j'th column as Cj.
* * * *
* * * *
Hence R3 means the 3rd row and C2 means the 2nd
column of the matrix. C2
The entry at the 3rd row, 2nd column is denoted as a32.
In general, the entry at the i'th row and j'th column is
denoted as aij.
a32
a11 a12 a13 . . . a1C
a21 a22 a23 . . . a2C
. . . . aij . .
. . . . . . .
aR1 aR2 aR3 . . . aRC R x C
So, the general form
of a R x C matrix is:
R3
17. Matrix Algebra
* * * *
We denote the i'th row as Ri and the j'th column as Cj.
* * * *
* * * *
Hence R3 means the 3rd row and C2 means the 2nd
column of the matrix. C2
The entry at the 3rd row, 2nd column is denoted as a32.
In general, the entry at the i'th row and j'th column is
denoted as aij.
a32
a11 a12 a13 . . . a1C
a21 a22 a23 . . . a2C
. . . . aij . .
. . . . . . .
aR1 aR2 aR3 . . . aRC R x C
i'th row
j'th column
So, the general form
of a R x C matrix is:
R3
18. Matrix Operations
Two matrices are the same if all the corresponding
entries are the same (so they must be the same size).
19. Matrix Operations
Two matrices are the same if all the corresponding
entries are the same (so they must be the same size).
We add/subtract same size matrices entry by entry.
22. Matrix Operations
3
–2
–1
0
4
2
4
3
5
–2
1
–1
– =
–1 2
Two matrices are the same if all the corresponding
entries are the same (so they must be the same size).
We add/subtract same size matrices entry by entry.
24. Matrix Operations
3
–2
–1
3 –2 –1
–4 0 2
0
4
2
4
3
5
–2
1
–1
– =
–1
–5
–6
2
3
3
+
–1
–5
–6
2
3
3
is undefined.
Two matrices are the same if all the corresponding
entries are the same (so they must be the same size).
We add/subtract same size matrices entry by entry.
25. Matrix Operations
3
–2
–1
3 –2 –1
–4 0 2
0
4
2
4
3
5
–2
1
–1
– =
–1
–5
–6
2
3
3
+
–1
–5
–6
2
3
3
is undefined.
There are two types of multiplications with matrices.
Two matrices are the same if all the corresponding
entries are the same (so they must be the same size).
We add/subtract same size matrices entry by entry.
26. Matrix Operations
3
–2
–1
3 –2 –1
–4 0 2
0
4
2
4
3
5
–2
1
–1
– =
–1
–5
–6
2
3
3
+
–1
–5
–6
2
3
3
is undefined.
There are two types of multiplications with matrices.
The first one is to multiply a matrix A by a constant k,
i.e. multiplying each entry by k.
Two matrices are the same if all the corresponding
entries are the same (so they must be the same size).
We add/subtract same size matrices entry by entry.
27. Matrix Operations
3
–2
–1
3 –2 –1
–4 0 2
0
4
2
4
3
5
–2
1
–1
– =
–1
–5
–6
2
3
3
+
–1
–5
–6
2
3
3
is undefined.
There are two types of multiplications with matrices.
The first one is to multiply a matrix A by a constant k,
i.e. multiplying each entry by k.
This is called scalar multiplication.
Two matrices are the same if all the corresponding
entries are the same (so they must be the same size).
We add/subtract same size matrices entry by entry.
28. For example, we define
scalar multiplication:
–1
–5
–6
2
3
3
3 =
–3
–15
–18
6
9
9
Matrix Operations
29. For example, we define
scalar multiplication:
–1
–5
–6
2
3
3
3 =
–3
–15
–18
6
9
9
The 2nd type is matrix multiplication.
Matrix Multiplication
Matrix Operations
30. For example, we define
scalar multiplication:
–1
–5
–6
2
3
3
When we multiply two matrices, we don't multiply
matrices entry by entry as in addition.
3 =
–3
–15
–18
6
9
9
The 2nd type is matrix multiplication.
Matrix Multiplication
Matrix Operations
31. For example, we define
scalar multiplication:
–1
–5
–6
2
3
3
When we multiply two matrices, we don't multiply
matrices entry by entry as in addition.
The simplest case of matrix multiplication is:
(row) * (column) = a number
3 =
–3
–15
–18
6
9
9
The 2nd type is matrix multiplication.
Matrix Multiplication
Matrix Operations
where the row and the column
have the same number of entries,
1x1
1xN Nx1
32. For example, we define
scalar multiplication:
–1
–5
–6
2
3
3
When we multiply two matrices, we don't multiply
matrices entry by entry as in addition.
The simplest case of matrix multiplication is:
(row) * (column) = a number
3 =
–3
–15
–18
6
9
9
The 2nd type is matrix multiplication.
Matrix Multiplication
Matrix Operations
where the row and the column
have the same number of entries,
i.e. the row has size 1xN and the column has size Nx1.
1xN Nx1 1x1
33. For example, we define
scalar multiplication:
–1
–5
–6
2
3
3
When we multiply two matrices, we don't multiply
matrices entry by entry as in addition.
The simplest case of matrix multiplication is:
(row) * (column) = a number
3 =
–3
–15
–18
6
9
9
The 2nd type is matrix multiplication.
Matrix Multiplication
Matrix Operations
where the row and the column
have the same number of entries,
i.e. the row has size 1xN and the column has size Nx1.
1xN Nx1
* * . . *
*
*
*
.
.
Looks like this:
= #
1x1
36. Example A:
Matrix Operations
Here is a 1×3 matrix times a 3×1 matrix.
3 –2 –1
2
3
3
= (3)(2) (–2)(3)
multiply the corresponding entries
37. Example A:
Matrix Operations
Here is a 1×3 matrix times a 3×1 matrix.
3 –2 –1
2
3
3
= (3)(2) (–2)(3) (–1)(3)
multiply the corresponding entries
38. Example A:
Matrix Operations
Here is a 1×3 matrix times a 3×1 matrix.
3 –2 –1
2
3
3
= (3)(2) + (–2)(3) + (–1)(3) = –3
multiply the corresponding entries
then add the products
39. Example A:
Matrix Operations
3 –2 –1
2
3
3
= (3)(2) + (–2)(3) + (–1)(3) = –3
where as 3 –2 –1
2 3 is undefined.
multiply the corresponding entries
then add the products
Here is a 1×3 matrix times a 3×1 matrix.
40. Example A:
Matrix Operations
3 –2 –1
2
3
3
= (3)(2) + (–2)(3) + (–1)(3) = –3
where as 3 –2 –1
2 3 is undefined.
multiply the corresponding entries
then add the products
Here is a 1×3 matrix times a 3×1 matrix.
Let's emphasize it again, the multiplication should be
* * * *
*
*
*
*
41. Example A:
Matrix Operations
3 –2 –1
2
3
3
= (3)(2) + (–2)(3) + (–1)(3) = –3
where as 3 –2 –1
2 3 is undefined.
multiply the corresponding entries
then add the products
Here is a 1×3 matrix times a 3×1 matrix.
Let's emphasize it again, the multiplication should be
* * * *
*
*
*
*
* * *
*
*
*
*
or as we´ll
see later.
42. Example A:
Matrix Operations
3 –2 –1
2
3
3
= (3)(2) + (–2)(3) + (–1)(3) = –3
where as 3 –2 –1
2 3 is undefined.
multiply the corresponding entries
then add the products
Here is a 1×3 matrix times a 3×1 matrix.
Let's emphasize it again, the multiplication should be
* * * *
*
*
*
*
*
*
*
*
* * * * * * *
* * *
*
*
*
*
*
*
*
*
or as we´ll
see later.
That is, the number of columns
on the left must equal the
number of rows on the right.
43. Matrix Operations
Here is a why the way matrix multiplication is defined.
Suppose on Monday John buys
2 lb of apples at $20/lb, and 3 lb of banana at $10/lb.
44. Matrix Operations
Here is a why the way matrix multiplication is defined.
Suppose on Monday John buys
2 lb of apples at $20/lb, and 3 lb of banana at $10/lb.
We put the fruit list in a row and
the costs in a column as shown below.
2 3
A B
10
20
$
A = apple,
B = banana
45. Matrix Operations
Here is a why the way matrix multiplication is defined.
Suppose on Monday John buys
2 lb of apples at $20/lb, and 3 lb of banana at $10/lb.
We put the fruit list in a row and
the costs in a column as shown below.
Their matrix product $70 represents the total cost.
2 3
A B
10
20
$
A = apple,
B = banana = 70
costs $
46. Matrix Operations
Here is a why the way matrix multiplication is defined.
Suppose on Monday John buys
2 lb of apples at $20/lb, and 3 lb of banana at $10/lb.
We put the fruit list in a row and
the costs in a column as shown below.
Their matrix product $70 represents the total cost.
Suppose Tuesday the prices change,
the apple cost $15/lb and the banana is $12/lb,
we track this with a new column for the price–matrix.
2 3
A B
10
20
$
A = apple,
B = banana = 70 2 3
10
20
12
15
$
A B
costs $
47. Matrix Operations
Here is a why the way matrix multiplication is defined.
Suppose on Monday John buys
2 lb of apples at $20/lb, and 3 lb of banana at $10/lb.
We put the fruit list in a row and
the costs in a column as shown below.
Their matrix product $70 represents the total cost.
Suppose Tuesday the prices change,
the apple cost $15/lb and the banana is $12/lb,
we track this with a new column for the price–matrix.
Then the matrix product reflects the costs for each day.
Hence defining matrix multiplication in this manner
is useful in manipulating tables of data.
2 3
A B
10
20
$
A = apple,
B = banana = 70 2 3
10
20
12
15
$
= 70 66
A B
costs $ costs $
50. Example B:
Matrix Operations
Next, we multiply a row to multiple columns,
to get a row of numbers.
3 –2 –1
2
3
3
1
2
–1
= (3)(2)+(–2)(3)+(–1)(3)
51. Example B:
Matrix Operations
Next, we multiply a row to multiple columns,
to get a row of numbers.
3 –2 –1
2
3
3
1
2
–1
= (3)(2)+(–2)(3)+(–1)(3) (3)(1)+(–2)(2)+(–1)(–1)
52. Example B:
Matrix Operations
Next, we multiply a row to multiple columns,
to get a row of numbers.
3 –2 –1
2
3
3
1
2
–1
= (3)(2)+(–2)(3)+(–1)(3) (3)(1)+(–2)(2)+(–1)(–1)
–3 0
=
53. Example B:
Matrix Operations
Next, we multiply a row to multiple columns,
to get a row of numbers.
Two-row times two-column yields a 2x2 matrix.
3 –2 –1
2
3
3
1
2
–1
= (3)(2)+(–2)(3)+(–1)(3) (3)(1)+(–2)(2)+(–1)(–1)
–3 0
=
Example C:
3 –2 –1 2
3
3
0 3 –2
1
2
–1
54. Example B:
Matrix Operations
Next, we multiply a row to multiple columns,
to get a row of numbers.
Two-row times two-column yields a 2x2 matrix.
3 –2 –1
2
3
3
1
2
–1
= (3)(2)+(–2)(3)+(–1)(3) (3)(1)+(–2)(2)+(–1)(–1)
–3 0
=
Example C:
3 –2 –1 2
3
3
0 3 –2
1
2
–1
=
(3)(2)+(–2)(3)+(–1)(3)
55. Example B:
Matrix Operations
Next, we multiply a row to multiple columns,
to get a row of numbers.
Two-row times two-column yields a 2x2 matrix.
3 –2 –1
2
3
3
1
2
–1
= (3)(2)+(–2)(3)+(–1)(3) (3)(1)+(–2)(2)+(–1)(–1)
–3 0
=
Example C:
3 –2 –1 2
3
3
0 3 –2
1
2
–1
=
(3)(2)+(–2)(3)+(–1)(3) (3)(1)+(–2)(2)+(–1)(–1)
56. Example B:
Matrix Operations
Next, we multiply a row to multiple columns,
to get a row of numbers.
Two-row times two-column yields a 2x2 matrix.
3 –2 –1
2
3
3
1
2
–1
= (3)(2)+(–2)(3)+(–1)(3) (3)(1)+(–2)(2)+(–1)(–1)
–3 0
=
Example C:
3 –2 –1 2
3
3
0 3 –2
1
2
–1
=
(3)(2)+(–2)(3)+(–1)(3)
(0)(2)+(3)(3)+(–2)(3)
(3)(1)+(–2)(2)+(–1)(–1)
57. Example B:
Matrix Operations
Next, we multiply a row to multiple columns,
to get a row of numbers.
Two-row times two-column yields a 2x2 matrix.
3 –2 –1
2
3
3
1
2
–1
= (3)(2)+(–2)(3)+(–1)(3) (3)(1)+(–2)(2)+(–1)(–1)
–3 0
=
Example C:
3 –2 –1 2
3
3
0 3 –2
1
2
–1
=
(3)(2)+(–2)(3)+(–1)(3)
(0)(2)+(3)(3)+(–2)(3)
(3)(1)+(–2)(2)+(–1)(–1)
(0)(1)+(3)(2)+(–2)(–1)
58. Example B:
Matrix Operations
Next, we multiply a row to multiple columns,
to get a row of numbers.
Two-row times two-column yields a 2x2 matrix.
3 –2 –1
2
3
3
1
2
–1
= (3)(2)+(–2)(3)+(–1)(3) (3)(1)+(–2)(2)+(–1)(–1)
–3 0
=
Example C:
3 –2 –1 2
3
3
0 3 –2
1
2
–1
=
(3)(2)+(–2)(3)+(–1)(3)
(0)(2)+(3)(3)+(–2)(3)
(3)(1)+(–2)(2)+(–1)(–1)
(0)(1)+(3)(2)+(–2)(–1)
=
–3 0
0 8
60. General Matrix Multiplication
Let A be an R x K matrix with entries denoted as a's
ai1 ai2 ai3 . . . aiK
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
A x B =
i'th row of A
R x K
61. General Matrix Multiplication
Let A be an R x K matrix with entries denoted as a's
and B be a K x N matrix with entries denoted as b's,
ai1 ai2 ai3 . . . aiK
b1j
b2j
b3j
.
bkj
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
.
.
.
.
.
.
x
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
A x B =
i'th row of A
j'th column of B
R x K
K x N
62. General Matrix Multiplication
Let A be an R x K matrix with entries denoted as a's
and B be a K x N matrix with entries denoted as b's,
then the product C = A x B has size R x N
ai1 ai2 ai3 . . . aiK
b1j
b2j
b3j
.
bkj
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
.
.
.
.
.
.
x
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
A x B =
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . cij . . . .
=
i'th row of A
j'th column of B
R x K
K x N
63. General Matrix Multiplication
Let A be an R x K matrix with entries denoted as a's
and B be a K x N matrix with entries denoted as b's,
then the product C = A x B has size R x N where
cij = (i'th row of A) x (j'th column of B)
ai1 ai2 ai3 . . . aiK
b1j
b2j
b3j
.
bkj
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
.
.
.
.
.
.
x
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
A x B =
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . cij . . . .
=
i'th row of A
j'th column of B
R x K
K x N
64. General Matrix Multiplication
Let A be an R x K matrix with entries denoted as a's
and B be a K x N matrix with entries denoted as b's,
then the product C = A x B has size R x N where
cij = (i'th row of A) x (j'th column of B)
cij = ai1b1j + ai2b2j + … + aikbkj.
ai1 ai2 ai3 . . . aiK
b1j
b2j
b3j
.
bkj
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
.
.
.
.
.
.
x
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
A x B =
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . cij . . . .
= cij = ai1b1j + ai2b2j + … +aikbkj
i'th row of A
j'th column of B
R x K
K x N
65. General Matrix Multiplication
Let A be an R x K matrix with entries denoted as a's
and B be a K x N matrix with entries denoted as b's,
then the product C = A x B has size R x N where
cij = (i'th row of A) x (j'th column of B)
cij = ai1b1j + ai2b2j + … + aikbkj.
ai1 ai2 ai3 . . . aiK
b1j
b2j
b3j
.
bkj
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
.
.
.
.
.
.
x
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
A x B =
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . cij . . . .
= cij = ai1b1j + ai2b2j + … +aikbkj
i'th row of A
j'th column of B
R x K
K x N
R x N
Note the product matrix has size
66. Example D: Let A = and B = ,
Matrix Operations
0 2
3 –1 –2
2 4 0 –1 4
find AB and BA if it's possible.
67. Example D: Let A = and B = ,
Matrix Operations
0 2
3 –1 –2
2 4 0 –1 4
find AB and BA if it's possible.
AB = 3 –1 –2
2 4 0
0 2
–1 4 is undefined due to their sizes.
different lengths
68. Example D: Let A = and B = ,
Matrix Operations
0 2
3 –1 –2
2 4 0 –1 4
find AB and BA if it's possible.
AB = 3 –1 –2
2 4 0
0 2
–1 4 is undefined due to their sizes.
To multiply BA =
0 2
–1 4
3 –1 –2
2 4 0
start with the 1st row of B, multiply it in order against
each column of A
BA =
0 2
–1 4
3 –1 –2
2 4 0
69. Example D: Let A = and B = ,
Matrix Operations
0 2
3 –1 –2
2 4 0 –1 4
find AB and BA if it's possible.
AB = 3 –1 –2
2 4 0
0 2
–1 4 is undefined due to their sizes.
To multiply BA =
0 2
–1 4
3 –1 –2
2 4 0
start with the 1st row of B, multiply it in order against
each column of A
BA =
0 2
–1 4
3 –1 –2
2 4 0
70. Example D: Let A = and B = ,
Matrix Operations
0 2
3 –1 –2
2 4 0 –1 4
find AB and BA if it's possible.
AB = 3 –1 –2
2 4 0
0 2
–1 4 is undefined due to their sizes.
To multiply BA =
0 2
–1 4
3 –1 –2
2 4 0
start with the 1st row of B, multiply it in order against
each column of A to get the 1st row of the product.
BA =
0 2
–1 4
3 –1 –2
2 4 0
=
0+4
71. Example D: Let A = and B = ,
Matrix Operations
0 2
3 –1 –2
2 4 0 –1 4
find AB and BA if it's possible.
AB = 3 –1 –2
2 4 0
0 2
–1 4 is undefined due to their sizes.
To multiply BA =
0 2
–1 4
3 –1 –2
2 4 0
start with the 1st row of B, multiply it in order against
each column of A to get the 1st row of the product.
BA =
0 2
–1 4
3 –1 –2
2 4 0
=
0+4 0+8 0+0
72. Example D: Let A = and B = ,
Matrix Operations
0 2
3 –1 –2
2 4 0 –1 4
find AB and BA if it's possible.
AB = 3 –1 –2
2 4 0
0 2
–1 4 is undefined due to their sizes.
To multiply BA =
0 2
–1 4
3 –1 –2
2 4 0
start with the 1st row of B, multiply it in order against
each column of A to get the 1st row of the product.
Then use the 2nd row of B and repeat the process to
get the 2nd row of the product, then the process stops.
BA =
0 2
–1 4
3 –1 –2
2 4 0
=
0+4 0+8 0+0
73. Example D: Let A = and B = ,
Matrix Operations
0 2
3 –1 –2
2 4 0 –1 4
find AB and BA if it's possible.
AB = 3 –1 –2
2 4 0
0 2
–1 4 is undefined due to their sizes.
To multiply BA =
0 2
–1 4
3 –1 –2
2 4 0
start with the 1st row of B, multiply it in order against
each column of A to get the 1st row of the product.
Then use the 2nd row of B and repeat the process to
get the 2nd row of the product, then the process stops.
BA =
0 2
–1 4
3 –1 –2
2 4 0
=
0+4 0+8 0+0
–3+8 1+16 2+0
74. Example D: Let A = and B = ,
Matrix Operations
0 2
3 –1 –2
2 4 0 –1 4
find AB and BA if it's possible.
AB = 3 –1 –2
2 4 0
0 2
–1 4 is undefined due to their sizes.
To multiply BA =
0 2
–1 4
3 –1 –2
2 4 0
start with the 1st row of B, multiply it in order against
each column of A to get the 1st row of the product.
Then use the 2nd row of B and repeat the process to
get the 2nd row of the product, then the process stops.
BA =
0 2
–1 4
3 –1 –2
2 4 0
=
0+4 0+8 0+0
–3+8 1+16 2+0
=
5 17 2
4 8 0
77. Matrix Operations
Square matrices are size n x n matrices.
is a 2 x 2 square matrix.
The n x n square matrices
1 0 0 . . 0
0 1 0 . . .
0 0 1 . . .
. . . . . .
0 0 . . . 1
. . . . . .
with 1's in the diagonal and 0's elsewhere are called
the n x n identity matrices and are denoted as In.
0 2
–1 4
78. Matrix Operations
Square matrices are size n x n matrices.
is a 2 x 2 square matrix.
The n x n square matrices
1 0 0 . . 0
0 1 0 . . .
0 0 1 . . .
. . . . . .
0 0 . . . 1
. . . . . .
with 1's in the diagonal and 0's elsewhere are called
the n x n identity matrices and are denoted as In.
Hence
I2 = 1 0
0 1
0 2
–1 4
79. Matrix Operations
Square matrices are size n x n matrices.
0 2
–1 4 is a 2 x 2 square matrix.
The n x n square matrices
1 0 0 . . 0
0 1 0 . . .
0 0 1 . . .
. . . . . .
0 0 . . . 1
. . . . . .
with 1's in the diagonal and 0's elsewhere are called
the n x n identity matrices and are denoted as In.
Hence
I2 = 1 0
0 1
and I3 =
1 0 0
0 1 0
0 0 1
Fact: Let A be a n x n matrix
and I be the n x n identity
matrix then I A = A I = A.
81. Matrix Operations
Fact: Let A be a n x n matrix and I be the n x n
identity matrix then I A = A I = A. For example,
0 2
–1 4
1 0
0 1 =
1 0
0 1
0 2
–1 4 =
0 2
–1 4
82. Matrix Operations
Fact: Let A be a n x n matrix and I be the n x n
identity matrix then I A = A I = A. For example,
0 2
–1 4
1 0
0 1 =
1 0
0 1
0 2
–1 4 =
0 2
–1 4
So In plays the role of 1 in multiplication of matrices.
83. Matrix Operations
Fact: Let A be a n x n matrix and I be the n x n
identity matrix then I A = A I = A. For example,
0 2
–1 4
The n x n square matrices of the form:
are called the scalar matrices.
1 0
0 1 =
1 0
0 1
0 2
–1 4 =
0 2
–1 4
So In plays the role of 1 in multiplication of matrices.
k 0 .. 0 0
0 k 0 .. 0
0 0 0 .. k
. . . . . . .
84. Matrix Operations
Fact: Let A be a n x n matrix and I be the n x n
identity matrix then I A = A I = A. For example,
0 2
–1 4
The n x n square matrices of the form:
are called the scalar matrices.
1 0
0 1 =
1 0
0 1
0 2
–1 4 =
0 2
–1 4
,
3 0
0 3
–1 0 0
0 –1 0
0 0 –1
are scalar matrices.
So In plays the role of 1 in multiplication of matrices.
k 0 .. 0 0
0 k 0 .. 0
0 0 0 .. k
. . . . . . .
85. Matrix Operations
Fact: Let A be a n x n matrix and I be the n x n
identity matrix then I A = A I = A. For example,
0 2
–1 4
The n x n square matrices of the form:
are called the scalar matrices.
1 0
0 1 =
1 0
0 1
0 2
–1 4 =
0 2
–1 4
,
3 0
0 3
–1 0 0
0 –1 0
0 0 –1
are scalar matrices.
One checks easily that multiplying a matrix A by a
scalar matrix is the same as multiplying by the scalar.
So In plays the role of 1 in multiplication of matrices.
k 0 .. 0 0
0 k 0 .. 0
0 0 0 .. k
. . . . . . .
86. Matrix Operations
Fact: Let A be a n x n matrix and I be the n x n
identity matrix then I A = A I = A. For example,
0 2
–1 4
The n x n square matrices of the form:
are called the scalar matrices.
1 0
0 1 =
1 0
0 1
0 2
–1 4 =
0 2
–1 4
,
3 0
0 3
–1 0 0
0 –1 0
0 0 –1
are scalar matrices.
One checks easily that multiplying a matrix A by a
scalar matrix is the same as multiplying by the scalar.
3 0
0 3
a b
c d =
a b
c d
3 0
0 3 =
3a 3b
3c 3d
a b
c d
3 =
So In plays the role of 1 in multiplication of matrices.
k 0 .. 0 0
0 k 0 .. 0
0 0 0 .. k
. . . . . . .
87. Matrix Operations
Fact: Let A be a n x n matrix and I be the n x n
identity matrix then I A = A I = A. For example,
0 2
–1 4
The n x n square matrices of the form:
are called the scalar matrices.
1 0
0 1 =
1 0
0 1
0 2
–1 4 =
0 2
–1 4
,
3 0
0 3
–1 0 0
0 –1 0
0 0 –1
are scalar matrices.
One checks easily that multiplying a matrix A by a
scalar matrix is the same as multiplying by the scalar.
3 0
0 3
a b
c d =
a b
c d
3 0
0 3 =
3a 3b
3c 3d
a b
c d
3 =
Scalar matrices act like constants for multiplication.
So In plays the role of 1 in multiplication of matrices.
k 0 .. 0 0
0 k 0 .. 0
0 0 0 .. k
. . . . . . .
89. Matrix Operations
Basic Laws of Matrix Algebra
Let A, B, and C be nxn square matrices
and k be a number, then
Associative Law
(AB)C = A(BC)
Distributive Laws
k(A ±B) = kA ± kB
C(A ±B) = CA ± CB
(A ±B)C = AC ± BC
90. Matrix Operations
Basic Laws of Matrix Algebra
Let A, B, and C be nxn square matrices
and k be a number, then
Associative Law
(AB)C = A(BC)
Distributive Laws
k(A ±B) = kA ± kB
C(A ±B) = CA ± CB
(A ±B)C = AC ± BC
Reminder: AB ≠ BA (in general)
91. Matrix Operations
Basic Laws of Matrix Algebra
Let A, B, and C be nxn square matrices
and k be a number, then
Associative Law
(AB)C = A(BC)
Distributive Laws
k(A ±B) = kA ± kB
C(A ±B) = CA ± CB
(A ±B)C = AC ± BC
Reminder: AB ≠ BA (in general)
Note that because for matrices that AB ≠ BA,
most of the algebra formulas fail
92. Matrix Operations
Basic Laws of Matrix Algebra
Let A, B, and C be nxn square matrices
and k be a number, then
Associative Law
(AB)C = A(BC)
Distributive Laws
k(A ±B) = kA ± kB
C(A ±B) = CA ± CB
(A ±B)C = AC ± BC
Reminder: AB ≠ BA (in general)
Note that because for matrices that AB ≠ BA,
most of the algebra formulas fail so that
(A ± B)2 ≠ A2 ± 2AB + B2, (A + B)(A – B) ≠ A2 – B2,
93. Matrix Operations
Basic Laws of Matrix Algebra
Let A, B, and C be nxn square matrices
and k be a number, then
Associative Law
(AB)C = A(BC)
Distributive Laws
k(A ±B) = kA ± kB
C(A ±B) = CA ± CB
(A ±B)C = AC ± BC
Reminder: AB ≠ BA (in general)
Note that because for matrices that AB ≠ BA,
most of the algebra formulas fail so that
(A ± B)2 ≠ A2 ± 2AB + B2, (A + B)(A – B) ≠ A2 – B2, specifically
(A + B)2 = A2 + AB + BA + B2, (A – B)2 = A2 – AB – BA + B2,
94. Matrix Operations
Basic Laws of Matrix Algebra
Let A, B, and C be nxn square matrices
and k be a number, then
Associative Law
(AB)C = A(BC)
Distributive Laws
k(A ±B) = kA ± kB
C(A ±B) = CA ± CB
(A ±B)C = AC ± BC
Reminder: AB ≠ BA (in general)
Note that because for matrices that AB ≠ BA,
most of the algebra formulas fail so that
(A ± B)2 ≠ A2 ± 2AB + B2, (A + B)(A – B) ≠ A2 – B2, specifically
(A + B)2 = A2 + AB + BA + B2, (A – B)2 = A2 – AB – BA + B2,
(A + B)(A – B) = A2 + BA – AB + B2, (A – B) A + B)= A2 – BA + AB + B2