Anda di halaman 1dari 10

Matrices

Numbers A single number in matrix notation is called a scalar. It can be 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.

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 on up. If Y is a column, then Y(i) means the i'th element of the column, counting from the top.

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 first element of the row with first element of the column, plus the 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 are called 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 ]

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 4 columns.

We denote that the objects are part of a matrix by using square brackets. An element of the matrix is referred to by two 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. [def] [ghi] [ a b c ] This is a 2 x 3 matrix. [def]

TM1203 Maths IT Assoc. Prof. Dr. Norshuhada Shiratuddin - Lecture-Notes 1

[ab] [cd] [ef] [a]

This is a 3 x 2 matrix.

This is a 1 x 1 matrix. Or it 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] [b] [c] 3 by 1 matrix

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 same numbers of rows as columns. A zero matrixis a matrix where all the elements are zeros. For example [ 0 0 0 ] is a zero matrix. [000] [000] A zero matrix serves many of the same functions in matrix arithmetic that 0 does in regular arithmetic.
5

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. [010] [001] 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, and i. [def] [ghi]

A diagonal matrix is one that has non-zero elements only on the diagonal. [ * 0 0 0 ] Diagonal matrix. [0*00] [00*0] [000*]

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.) [*0000000] [0**00000] [0**00000] [000***00] B [000***00] [000***00] [000000**] [000000**]

lock diagonal matrix.

A Band Matrix has numbers near the diagonal of the matrix, and nowhere else. The width of the band is called the band width of the matrix. [***00000] [****0000] [*****000] [ 0 * * * * * 0 0 ] Band matrix. [00*****0] [000*****] [0000****] [00000***]

TM1203 Maths IT Assoc. Prof. Dr. Norshuhada Shiratuddin - Lecture-Notes 1

A matrix is called sparseif most of the elements in it are zero. [000*0000] [0*0000*0] [0000*000] [ 0 0 * 0 0 0 0 0 ] Sparse matrix. [*0000000] [0000000*] [00*00*00] [000*0000]

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 ] [def] [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 ] [def] [be] [cf]

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 symmetric matrix. (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)

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. [befg] (Note that it looks like it was reflected [cfhi] across the diagonal.) [dgij] 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 [*****] [0****] [00***] [000**] [0000*] lower triangular [*0000] [**000] [***00] [****0] [*****]

upper unit triangular lower unit triangular [1****] [10000] [01***] [*1000] [001**] [**100] [0001*] [***10] [00001] [****1]

Matrices of the same size may be added, by making a new matrix 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

Anda mungkin juga menyukai