180 likes | 195 Vues
Learn about matrices, their dimensions, elements, and operations such as addition, subtraction, scalar multiplication, and matrix multiplication. Explore square matrices, identity matrices, Boolean matrices, and more.
E N D
Matrices are rectangular arrangements of data that are used to represent information in tabular form. a23 Dimensions: number of rows and columns A is a 2 x 3 matrix Elements of a matrix A are denoted by aij. a23 = 8
Data about many kinds of problems can often be represented by matrix. e.g Average temperatures in 3 different cities for each month: 3 cities 12 months Jan - Dec Average temp. in the 3rd city in July, a37, is 91.
Matrix of coefficients Solutions to many problems can be obtained by solving systems of linear equations. For example, the constraints of a problem are represented by the system of linear equations x + y = 70 24x + 14y = 1180 is the matrix of coefficient for this system of linear equations.
In a matrix, the arrangement of the entries is significant. Therefore, for two matrices to be equal they must have the same dimensions and the same entries in each location. Example: Let If X = Y, then x = 3, y = 6, z = 2, and w = 0.
Square Matrix is a matrix in which the number of rows equals the number of columns. • Main Diagonal: in a n x n square matrix, the elements a11, a22, a33, …, ann form the main diagonal of the matrix. • Symmetric matrix:If the corresponding elements match when we think of folding the matrix along the main diagonal, then the matrix is symmetric about the main • diagonal. • In a symmetric matrix, aij = aji.
Example: The square matrix Main Diagonal is symmetric. Note that a21 = a12 = 5 a31 = a13 = 7 a32 = a23 = 2
Matrix Operations • Scalar multiplication: • Multiply each entry of a matrix by a fixed single number called scalar. • ex: The result of multiplying matrix • by the scalar r = 3 is
Addition: • Adding the corresponding elements of 2 matrices that have the same dimensions. • ex: For • the matrix A+B is
Subtraction: • defined by A – B = A + (-1)B. • In a zero matrix, all entries are 0. • An n m zero matrix is denoted by 0. • If A and B are n x m matrices and r and s are scalars, the following matrix equations are true: • 0 + A = A • A + B = B + A • (A + B) + C = A + (B + C) • r(A + B) = rA + rB • (r + s)A = rA + sA • r(sA) = (rs)A
Multiplication of matrices: • A: n m matrix • B: m p matrix • A B = C, where • An entry in row i, column j of A B is obtained by multiplying elements in row i of A by the corresponding elements in column j of B and adding the results. • To compute A times B, the number of columns in A must equal the number of rows in B. The result C is an n p matrix.
Example: Let 2 3 matrix 3 2 matrix 2(5) + 4(2) + 3(6) = 10 + 8 + 18 = 36 Note that A is a 2 3 matrix and B is a 3 2 matrix. The product A • Bis a 2 2 matrix.
Example: Compute A B and B A for Note: A B B A .
Where A, B and C are matrices of appropriate dimensions and r and s are scalars, the following matrix equations are true: (The notation A(B C) is shorthand for A (B C) ) A(B C) = (A B)C A(B + C) = A B + A C (A + B)C = A C + B C rA sB = (rs)(A B)
Identity matrix The n n matrix with 1s along the main diagonal and 0s elsewhere is called the identitymatrix, denoted by I. If we multiply I times any n n matrix A, we get A as the result. The equation I • A = A • I = A holds. Let Similarly, A • I=A.
An n n matrix A is invertible if there exists an n n matrix B such that A • B = B • A = I In this case B is called the inverse of A, denoted by A-1. Let Then, following the rules of matrix multiplication, it can be shown that A • B = B • A = I, so B = A-1.
Boolean Matrices Matrices with only 0s and 1s as entries are called Boolean matrices. Boolean multiplication: x y = min(x,y) Boolean addition: x y = max(x,y) Boolean matrix multiplication A B is defined by Cij = (aik bkj) A B: corresponding elements are combined using Boolean multiplication. A B: corresponding elements are combined using Boolean addition. m k=1
Let A and B be Boolean matrices, Then And the Boolean product A B is