IT 131: Mathematics for Science Lecture Notes 3 Source: Larson, Edwards, Falvo (2009): Elementary Linear Algebra, Sixth Edition. Matrices 2.1 Operations with Matrices This section and the next introduce some fundamentals of matrix theory. It is standard mathematical convention to represent matrices in any one of the following three ways. 1. A matrix can be denoted by an uppercase letter such as A, B, C,.... 2. A matrix can be denoted by a representative element enclosed in brackets, such as aij, bij, cij,.... A matrix can be denoted by a rectangular array of numbers 1 As mentioned in the previous Lecture, the matrices are primarily real matrices. That is, their entries contain real numbers. Two matrices are said to be equal if their corresponding entries are equal. Definition of Equality of Matrices Example 1: Equality of Matrices Consider the four matrices Matrices A and B are not equal because they are of different sizes. Similarly, B and C are not equal. Matrices A and D are equal if and only if x= 3. A matrix that has only one column is called a column matrix or column vector. Similarly, a matrix that has only one row is called a row matrix or row vector. Boldface lowercase letters are often used to designate column matrices and row matrices. For instance, matrix A in Example 1 can be partitioned into two column matrices
2 MATRIX ADDITION You can add two matrices (of the same size) by adding their corresponding entries. Definition of Matrix Addition Example 2: Addition of Matrices SCALAR MULTIPLICATION When working with matrices, real numbers are referred to as scalars. You can multiply a matrix A by a scalar c by multiplying each entry in A by c. Definition of Scalar Multiplication You can use - A to represent the scalar product (-1)A. If A and B are of the same size, A - B represents the sum of A and ( - 1)B. That is
Example 3: Scalar Multiplication and Matrix Subtraction 3 Solution MATRIX MULTIPLICATION The third basic matrix operation is matrix multiplication. Definition of Matrix Multiplication This definition means that the entry in the i th row and the j th column of the product AB is obtained by multiplying the entries in the i th row of A by the corresponding entries in the j th column of B and then adding the results. The next example illustrates this process. Example 4: Finding the Product of Two
4 Solution Be sure you understand that for the product of two matrices to be defined, the number of columns of the first matrix must equal the number of rows of the second matrix. That is,
So, the product BA is not defined for matrices such as A and B in Example 4 The general pattern for matrix multiplication is as follows. To obtain the element in the i th row and the j th column of the product AB, use the i th row of A and the j th column of B. 5 Discovery Example 5: Matrix Multiplication
6 R E M A R K : Note the difference between the two products in parts (d) and (e) of Example 5. In general, matrix multiplication is not commutative. It is usually not true that the product AB is equal to the product BA. SYSTEM OF LINEAR EQUATION One practical application of matrix multiplication is representing a system of linear equations. Note how the system can be written as the matrix equation Ax b, where A is the coefficient matrix of the system, and x and b are column matrices. You can write the system as Example 6: Solving a System of Linear Equations Solution Using Gauss-Jordan elimination on the augmented matrix of this system, you obtain So, the system has an infinite number of solutions. Here a convenient choice of a parameter is x3= 7t, and you can write the solution set as
7 In matrix terminology, you have found that the matrix equation has an infinite number of solutions represented by That is, any scalar multiple of the column matrix on the right is a solution. PARTITIONED MATRICES The system Ax = b can be represented in a more convenient way by partitioning the matrices A and x in the following manner. If are the coefficient matrix, the column matrix of unknowns, and the right-hand side, respec- tively, of the m linear system Ax = b, then you can write n
8 In other words, where a1, a2,..., an are the columns of the matrix A. The expression is called a linear combination of the column matrices a1, a2,..., an with coefficients x1, x2,..., xn. In general, the matrix product Ax is a linear combination of the column vectors a1, a2,..., an that form the coefficient matrix A. Furthermore, the system Ax = b is consistent if and only if b can be expressed as such a linear combination, where the coefficients of the linear combination are a solution of the system. Example 7: Solving a System of Linear Equations can be rewritten as a matrix equation Ax=b, as follows. Using Gaussian elimination, you can show that this system has an infinite number of solutions, one of which is x1 = 1, x2 = 1, x3 = 1. That is, b can be expressed as a linear combination of the columns of A. This representation of one column vector in terms of others is a fundamental theme of linear algebra. Just as you partitioned A into columns and x into rows, it is often useful to consider an m x n matrix partitioned into smaller matrices. For example, the matrix on the left below can be partitioned as shown below at the right. The matrix could also be partitioned into column matrices
9 or row matrices
10
11
12
13