oooooaaaa
TRANSCRIPT
-
8/3/2019 OOOOOAAAA
1/10
Matrices
Numbers
A single number in matrix notation is called a scalar. It canbe looked at as a number, or as a 1 x 1 matrix, or as a one
element row or column.
Rows
A row(also called a row vector) is just an ordered
collection of elements. For example,
[ a b c ]
is a row.
If you have two rows of the same length, you can add the
rows by adding the corresponding elements in each row.
For example, the row
[ d e f ] + [ g h i ] = [ d+g e+h f+i ]
One can multiply a row by a scalar (number). For example,
2 * [ a b c ] = [ 2a 2b 2c ]
A row may have any number of elements, from one on up.
If Z is a row, Z(i) means the i'th element of that row.
1
-
8/3/2019 OOOOOAAAA
2/10
TM1203 Maths IT
Assoc. Prof. Dr. Norshuhada Shiratuddin - Lecture-Notes 1
Columns
A column(also called a column vector) is just like a row,
except it is arranged vertically. For example:
[ a ]
[ b ]
[ c ]
Columns can be added, or multiplied by a scalar (number)
the same way that rows can:
[ a ] [ g ] [ a+g ]
[ b ] + [ h ] = [ b+h ][ c ] [ i ] [ c+i ]
[ a ] [ 2a ]
2 * [ b ] = [ 2b ][ c ] [ 2c ]
A column may have any number of elements, from one onup.
If Y is a column, then Y(i) means the i'th element of thecolumn, counting from the top.
2
-
8/3/2019 OOOOOAAAA
3/10
TM1203 Maths IT
Assoc. Prof. Dr. Norshuhada Shiratuddin - Lecture-Notes 1
Operations on rows and columns
If you have a row and a column, you can form what's called
an "inner product", or "vector product", or a " dot
product". The inner product is the product of the firstelement of the row with first element of the column, plusthe product of the second two elements, etc. For example:
[ a b c ] [ d ] = [ a*d + b*e + c*f ]
(or just the scalar) a*d + b*e + c*f
[ e ][ f ]
A row and column that have a dot product of zero arecalled Orthogonal vectors .
There is also another kind of product (" outer product")
[ a ] [ d e f ] = [ a*d a*e a*f ][ b ] [ b*d b*e b*f ]
[ c ] [ c*d c*e c*f ]
3
-
8/3/2019 OOOOOAAAA
4/10
TM1203 Maths IT
Assoc. Prof. Dr. Norshuhada Shiratuddin - Lecture-Notes 1
Matrices
A matrixcan be looked at as a column of rows, or as a row
of columns.
What is a Matrix?
A matrixis a rectangular collection of like objects, usually
numbers. We are primarily interested in matrices because
they can be used to solve systems of linear equations.
The orderof a matrix is the number of rows and columns.
This is a (3x4) matrix because it contains 3 rows and 4columns.
We denote that the objects are part of a matrix by using
square brackets. An element of the matrix is referred to bytwo subscripts - the first is the row and the second is the
column, ar
c
.
Examples of matrices (with their sizes):
[ a b c ] This is a 3 x 3 matrix.
[ d e f ]
[ g h i ]
[ a b c ] This is a 2 x 3 matrix.
[ d e f ]
4
-
8/3/2019 OOOOOAAAA
5/10
TM1203 Maths IT
Assoc. Prof. Dr. Norshuhada Shiratuddin - Lecture-Notes 1
[ a b ] This is a 3 x 2 matrix.[ c d ]
[ e f ]
[ a ] This is a 1 x 1 matrix. Orit is a number, your choice.
(Or it is a scalar)
[ a b c ] This is a 1 x 3 matrix, or
it is a row, also your
choice.
[ a ] 3 by 1 matrix
[ b ][ c ]
If X is a matrix, X(i,j) means the element at the i'th row,
and j'th column of the matrix.
A matrix is called a square matrix if it has the samenumbers of rows as columns.
A zero matrix is a matrix where all the elements are zeros.
For example
[ 0 0 0 ] is a zero matrix.
[ 0 0 0 ][ 0 0 0 ]
A zero matrix serves many of the same functions in matrix
arithmetic that 0 does in regular arithmetic.
5
-
8/3/2019 OOOOOAAAA
6/10
TM1203 Maths IT
Assoc. Prof. Dr. Norshuhada Shiratuddin - Lecture-Notes 1
The identity matrix is a matrix that has one's on the
diagonal, and zeros everywhere else. For example:
[ 1 0 0 ] is an identity matrix.
[ 0 1 0 ][ 0 0 1 ]
The identity matrix is usually written "I".
An identity matrix serves may of the same functions in
matrix arithmetic that 1 does in regular arithmetic.
The diagonalof a matrix are the elements that have
identical row and column numbers. (X(i,i)) For example:
The diagonal of [ a b c ] is a, e, andi.
[ d e f ][ g h i ]
A diagonal matrix is one that has non-zero elements only
on the diagonal.
[ * 0 0 0 ] Diagonal matrix.[ 0 * 0 0 ]
[ 0 0 * 0 ]
[ 0 0 0 * ]
6
-
8/3/2019 OOOOOAAAA
7/10
TM1203 Maths IT
Assoc. Prof. Dr. Norshuhada Shiratuddin - Lecture-Notes 1
A block diagonal matrix is like a diagonal matrix, except
that elements exist in the positions arranged as blocks.
Example: (Where * means a non-zero element.)
[ * 0 0 0 0 0 0 0 ]
[ 0 * * 0 0 0 0 0 ][ 0 * * 0 0 0 0 0 ]
[ 0 0 0 * * * 0 0 ] B lock diagonal matrix.[ 0 0 0 * * * 0 0 ]
[ 0 0 0 * * * 0 0 ]
[ 0 0 0 0 0 0 * * ][ 0 0 0 0 0 0 * * ]
A Band Matrixhas numbers near the diagonal of the
matrix, and nowhere else. The width of the band is called
the band width of the matrix.
[ * * * 0 0 0 0 0 ]
[ * * * * 0 0 0 0 ][ * * * * * 0 0 0 ]
[ 0 * * * * * 0 0 ] Band matrix.
[ 0 0 * * * * * 0 ]
[ 0 0 0 * * * * * ][ 0 0 0 0 * * * * ]
[ 0 0 0 0 0 * * * ]
7
-
8/3/2019 OOOOOAAAA
8/10
TM1203 Maths IT
Assoc. Prof. Dr. Norshuhada Shiratuddin - Lecture-Notes 1
A matrix is called sparseif most of the elements in it are
zero.
[ 0 0 0 * 0 0 0 0 ]
[ 0 * 0 0 0 0 * 0 ][ 0 0 0 0 * 0 0 0 ]
[ 0 0 * 0 0 0 0 0 ] Sparse matrix.
[ * 0 0 0 0 0 0 0 ][ 0 0 0 0 0 0 0 * ]
[ 0 0 * 0 0 * 0 0 ][ 0 0 0 * 0 0 0 0 ]
A matrix is called denseif it is not sparse.
The transpose of a matrix "N" (Written N') is just a matrix"P" such that N(i,j) = P(j,i). For example:
transpose ( [ a b c ] ) = [ a d ]
[ d e f ] [ b e ]
[ c f ](The matrix has just been reflected
across the diagonal)
Or with ' notation:if A = [ a b c ] then A' = [ a d ]
[ d e f ] [ b e ]
[ c f ]
8
-
8/3/2019 OOOOOAAAA
9/10
TM1203 Maths IT
Assoc. Prof. Dr. Norshuhada Shiratuddin - Lecture-Notes 1
If a matrix M has the property that
M'M = I
than the matrix is called an Orthogonal matrix
The transpose of a product (AB)' is the product of the
individual transposes in reverse order. (B'A')
The transpose of a row is a column, and the transpose of a
column is a row. Example:
[ a b c]' = [ a ]
[ b ][ c ]
It is usually easier to write column matrices using
transposes as
[a b c]'
than as[a]
[b][c]
If a matrix is equal to its own transpose, it is called a
symmetricmatrix. (See below)
The transpose of a number is just a number.
(AB)' = B'A' in general. (A transpose of a product is the
product of the transposes in reverse order)
9
-
8/3/2019 OOOOOAAAA
10/10
TM1203 Maths IT
Assoc. Prof. Dr. Norshuhada Shiratuddin - Lecture-Notes 1
A symmetric matrix is a square matrix equal to it's
transpose. For example:
[ a b c d ] is a symmetric matrix.
[ b e f g ] (Note that it looks like it was reflected[ c f h i ]across the diagonal.)
[ d g i j ]
A 1x1 matrix (just a number) or a scalar is symmetric.
A symmetric matrix has the property that A = A'.
A matrix with entries only below the diagonal, or with
entries only above the diagonal, is called a (lower, upper)
triangular matrix . If the diagonal in those cases consists
only of 1's, then the matrix is unit triangular. Examples:
upper triangular lower triangular
[ * * * * * ] [ * 0 0 0 0 ]
[ 0 * * * * ] [ * * 0 0 0 ][ 0 0 * * * ] [ * * * 0 0 ]
[ 0 0 0 * * ] [ * * * * 0 ]
[ 0 0 0 0 * ] [ * * * * * ]
upper unit triangular lower unit triangular[ 1 * * * * ] [ 1 0 0 0 0 ]
[ 0 1 * * * ] [ * 1 0 0 0 ][ 0 0 1 * * ] [ * * 1 0 0 ]
[ 0 0 0 1 * ] [ * * * 1 0 ]
[ 0 0 0 0 1 ] [ * * * * 1 ]
Matrices of the same size may be added, by making a newmatrix of the same size, with elements that just add the
corresponding elements from the matrices being added. For
example:
[ a b c ] + [ h i j ] = [ a+h b+i c+j ]
[ d e f ] [ k l m ] [ d+k e+l f+m ]
10