7.1 Matrices, Vectors: Addition and Scalar Multiplication

Slides:



Advertisements
Similar presentations
Chapter Matrices Matrix Arithmetic
Advertisements

Applied Informatics Štefan BEREŽNÝ
Mathematics. Matrices and Determinants-1 Session.
Review of Matrix Algebra
7 Linear Algebra: Matrices, Vectors, Determinants. Linear Systems
MOHAMMAD IMRAN DEPARTMENT OF APPLIED SCIENCES JAHANGIRABAD EDUCATIONAL GROUP OF INSTITUTES.
CALCULUS – II Matrix Multiplication by Dr. Eman Saad & Dr. Shorouk Ossama.
Matrix Definition A Matrix is an ordered set of numbers, variables or parameters. An example of a matrix can be represented by: The matrix is an ordered.
MATRICES. Matrices A matrix is a rectangular array of objects (usually numbers) arranged in m horizontal rows and n vertical columns. A matrix with m.
3.8 Matrices.
Chapter 1: Matrices Definition 1: A matrix is a rectangular array of numbers arranged in horizontal rows and vertical columns. EXAMPLE:
1.3 Matrices and Matrix Operations.
Systems of Linear Equation and Matrices
Chap. 2 Matrices 2.1 Operations with Matrices
A rectangular array of numbers (we will concentrate on real numbers). A nxm matrix has ‘n’ rows and ‘m’ columns What is a matrix? First column First row.
Matrices & Determinants Chapter: 1 Matrices & Determinants.
1.3 Matrices and Matrix Operations. Definition A matrix is a rectangular array of numbers. The numbers in the array are called the entries in the matrix.
1 C ollege A lgebra Systems and Matrices (Chapter5) 1.
Multivariate Statistics Matrix Algebra I W. M. van der Veld University of Amsterdam.
Prepared by Deluar Jahan Moloy Lecturer Northern University Bangladesh
Meeting 18 Matrix Operations. Matrix If A is an m x n matrix - that is, a matrix with m rows and n columns – then the scalar entry in the i th row and.
For real numbers a and b,we always have ab = ba, which is called the commutative law for multiplication. For matrices, however, AB and BA need not be equal.
2 2.1 © 2012 Pearson Education, Inc. Matrix Algebra MATRIX OPERATIONS.
Matrices Section 2.6. Section Summary Definition of a Matrix Matrix Arithmetic Transposes and Powers of Arithmetic Zero-One matrices.
1.3 Matrices and Matrix Operations. A matrix is a rectangular array of numbers. The numbers in the arry are called the Entries in the matrix. The size.
Matrices and Determinants
Matrices and Matrix Operations. Matrices An m×n matrix A is a rectangular array of mn real numbers arranged in m horizontal rows and n vertical columns.
MATRIX A set of numbers arranged in rows and columns enclosed in round or square brackets is called a matrix. The order of a matrix gives the number of.
1 Objective To provide background material in support of topics in Digital Image Processing that are based on matrices and/or vectors. Review Matrices.
Chapter 7 Linear Algebra: Matrices, Vectors, Determinants. Linear Systems 楊學成 教授.
Matrix Algebra Definitions Operations Matrix algebra is a means of making calculations upon arrays of numbers (or data). Most data sets are matrix-type.
Matrices, Vectors, Determinants.
Introduction Types of Matrices Operations
MATRICES A rectangular arrangement of elements is called matrix. Types of matrices: Null matrix: A matrix whose all elements are zero is called a null.
Matrices. Matrix A matrix is an ordered rectangular array of numbers. The entry in the i th row and j th column is denoted by a ij. Ex. 4 Columns 3 Rows.
Linear Algebra by Dr. Shorouk Ossama.
Matrices Introduction.
7.3 Linear Systems of Equations. Gauss Elimination
Matrices and Vector Concepts
3.8 Matrices L Al-zaid Math1101.
Sections 2.4 and 2.5 Matrix Operations
Matrix Algebra MATRIX OPERATIONS © 2012 Pearson Education, Inc.
Matrices and Matrix Operations
Matrix Algebra MATRIX OPERATIONS.
7.7 Determinants. Cramer’s Rule
1.4 Inverses; Rules of Matrix Arithmetic
1.5 Matricies.
B PART Linear Algebra. Vector Calculus Part B p1.
MATHEMATICS Matrix Algebra
5 Systems of Linear Equations and Matrices
MATHEMATICS Matrix Multiplication
Matrix Algebra MATRIX OPERATIONS © 2012 Pearson Education, Inc.
L6 matrix operations.
L5 matrix.
Matrices and Vectors Review Objective
of Matrices and Vectors
Chapter 1 Matrices and Systems of Equations Basil Hamed
Section 2.4 Matrices.
Matrices Introduction.
Matrices and Matrix Operations
Matrices.
Objective To provide background material in support of topics in Digital Image Processing that are based on matrices and/or vectors.
6 Systems of Linear Equations and Matrices
Systems of Linear Equations and Matrices
Matrix Operations Ms. Olifer.
Matrix Algebra MATRIX OPERATIONS © 2012 Pearson Education, Inc.
Matrices and Determinants
3.8 Matrices L Al-zaid Math1101.
Matrix Algebra THE INVERSE OF A MATRIX © 2012 Pearson Education, Inc.
Matrices and Determinants
Presentation transcript:

7.1 Matrices, Vectors: Addition and Scalar Multiplication Section 7.1 p1

7.1 Matrices, Vectors: Addition and Scalar Multiplication A matrix is a rectangular array of numbers or functions which we will enclose in brackets. For example, (1) are matrices. The numbers (or functions) are called entries or, less commonly, elements of the matrix. The first matrix in (1) has two rows, which are the horizontal lines of entries. Section 7.1 p2

7.1 Matrices, Vectors: Addition and Scalar Multiplication (continued) Furthermore, it has three columns, which are the vertical lines of entries. The second and third matrices are square matrices, which means that each has as many rows as columns—3 and 2, respectively. The entries of the second matrix have two indices, signifying their location within the matrix. The first index is the number of the row and the second is the number of the column, so that together the entry’s position is uniquely identified. For example, a23 (read a two three) is in Row 2 and Column 3, etc. The notation is standard and applies to all matrices, including those that are not square. Section 7.1 p3

7.1 Matrices, Vectors: Addition and Scalar Multiplication (continued) Matrices having just a single row or column are called vectors. Thus, the fourth matrix in (1) has just one row and is called a row vector. The last matrix in (1) has just one column and is called a column vector. Because the goal of the indexing of entries was to uniquely identify the position of an element within a matrix, one index suffices for vectors, whether they are row or column vectors. Thus, the third entry of the row vector in (1) is denoted by a3. Section 7.1 p4

General Concepts and Notations 7.1 Matrices, Vectors: Addition and Scalar Multiplication General Concepts and Notations Let us formalize what we just have discussed. We shall denote matrices by capital boldface letters A, B, C, … , or by writing the general entry in brackets; thus A = [ajk], and so on. By an m × n matrix (read m by n matrix) we mean a matrix with m rows and n columns—rows always come first! m × n is called the size of the matrix. Thus an m × n matrix is of the form (2) Section 7.1 p5

General Concepts and Notations (continued) 7.1 Matrices, Vectors: Addition and Scalar Multiplication General Concepts and Notations (continued) The matrices in (1) are of sizes 2 × 3, 3 × 3, 2 × 2, 1 × 3, and 2 × 1, respectively. Each entry in (2) has two subscripts. The first is the row number and the second is the column number. Thus a21 is the entry in Row 2 and Column 1. If m = n, we call A an n × n square matrix. Then its diagonal containing the entries a11, a22, … , ann is called the main diagonal of A. Thus the main diagonals of the two square matrices in (1) are a11, a22, a33 and e−x, 4x, respectively. Square matrices are particularly important, as we shall see. A matrix of any size m × n is called a rectangular matrix; this includes square matrices as a special case. Section 7.1 p6

7.1 Matrices, Vectors: Addition and Scalar Multiplication A vector is a matrix with only one row or column. Its entries are called the components of the vector. We shall denote vectors by lowercase boldface letters a, b, … or by its general component in brackets, a = [aj], and so on. Our special vectors in (1) suggest that a (general) row vector is of the form Section 7.1 p7

Vectors (continued) A column vector is of the form 7.1 Matrices, Vectors: Addition and Scalar Multiplication Vectors (continued) A column vector is of the form Section 7.1 p8

Definition Equality of Matrices 7.1 Matrices, Vectors: Addition and Scalar Multiplication Definition Equality of Matrices Two matrices A = [ajk] and B = [bjk] are equal, written A = B, if and only if they have the same size and the corresponding entries are equal, that is, a11 = b11, a12 = b12, and so on. Matrices that are not equal are called different. Thus, matrices of different sizes are always different. Section 7.1 p9

Definition Addition of Matrices 7.1 Matrices, Vectors: Addition and Scalar Multiplication Definition Addition of Matrices The sum of two matrices A = [ajk] and B = [bjk] of the same size is written A + B and has the entries ajk + bjk obtained by adding the corresponding entries of A and B. Matrices of different sizes cannot be added. Section 7.1 p10

Definition Scalar Multiplication (Multiplication by a Number) 7.1 Matrices, Vectors: Addition and Scalar Multiplication Definition Scalar Multiplication (Multiplication by a Number) The product of any m × n matrix A = [ajk] and any scalar c (number c) is written cA and is the m × n matrix cA = [cajk] obtained by multiplying each entry of A by c. Section 7.1 p11

Rules for Matrix Addition and Scalar Multiplication. 7.1 Matrices, Vectors: Addition and Scalar Multiplication Rules for Matrix Addition and Scalar Multiplication. From the familiar laws for the addition of numbers we obtain similar laws for the addition of matrices of the same size m × n, namely, (3) Here 0 denotes the zero matrix (of size m × n), that is, the m × n matrix with all entries zero. If m = 1 or n = 1, this is a vector, called a zero vector. Section 7.1 p12

Rules for Matrix Addition and Scalar Multiplication. (continued) 7.1 Matrices, Vectors: Addition and Scalar Multiplication Rules for Matrix Addition and Scalar Multiplication. (continued) Hence matrix addition is commutative and associative [by (3a) and (3b)]. Similarly, for scalar multiplication we obtain the rules (4) Section 7.1 p13

7.2 Matrix Multiplication Section 7.2 p14

Definition Multiplication of a Matrix by a Matrix 7.2 Matrix Multiplication Definition Multiplication of a Matrix by a Matrix The product C = AB (in this order) of an m × n matrix A = [ajk] times an r × p matrix B = [bjk] is defined if and only if r = n and is then the m × p matrix C = [cjk] with entries (1) Section 7.2 p15

7.2 Matrix Multiplication The condition r = n means that the second factor, B, must have as many rows as the first factor has columns, namely n. A diagram of sizes that shows when matrix multiplication is possible is as follows: A B = C [m × n] [n × p] = [m × p]. Section 7.2 p16

7.2 Matrix Multiplication The entry cjk in (1) is obtained by multiplying each entry in the jth row of A by the corresponding entry in the kth column of B and then adding these n products. For instance, c21 = a21b11 + a22b21 + … + a2nbn1, and so on. One calls this briefly a multiplication of rows into columns. For n = 3, this is illustrated by where we shaded the entries that contribute to the calculation of entry c21 just discussed. Section 7.2 p17

Matrix Multiplication EXAMPLE 1 Matrix Multiplication Here c11 = 3 · 2 + 5 · 5 + (−1) · 9 = 22, and so on. The entry in the box is c23 = 4 · 3 + 0 · 7 + 2 · 1 = 14. The product BA is not defined. Section 7.2 p18

Matrix Multiplication Is Not Commutative, AB ≠ BA in General EXAMPLE 4 CAUTION! Matrix Multiplication Is Not Commutative, AB ≠ BA in General This is illustrated by Examples 1 and 2, where one of the two products is not even defined, and by Example 3, where the two products have different sizes. But it also holds for square matrices. For instance, It is interesting that AB = 0 this also shows that does not necessarily imply BA = 0 or A = 0 or B = 0. Section 7.2 p19

7.2 Matrix Multiplication Our examples show that in matrix products the order of factors must always be observed very carefully. Otherwise matrix multiplication satisfies rules similar to those for numbers, namely. (2) provided A, B, and C are such that the expressions on the left are defined; here, k is any scalar. (2b) is called the associative law. (2c) and (2d) are called the distributive laws. Section 7.2 p20

(5) AB = A[b1 b2 … bp] = [Ab1 Ab2 … Abp]. 7.2 Matrix Multiplication Parallel processing of products on the computer is facilitated by a variant of (3) for computing C = AB, which is used by standard algorithms (such as in Lapack). In this method, A is used as given, B is taken in terms of its column vectors, and the product is computed columnwise; thus, (5) AB = A[b1 b2 … bp] = [Ab1 Ab2 … Abp]. Columns of B are then assigned to different processors (individually or several to each processor), which simultaneously compute the columns of the product matrix Ab1, Ab2, etc. Section 7.2 p21

7.2 Matrix Multiplication Transposition We obtain the transpose of a matrix by writing its rows as columns (or equivalently its columns as rows). This also applies to the transpose of vectors. Thus, a row vector becomes a column vector and vice versa. In addition, for square matrices, we can also “reflect” the elements along the main diagonal, that is, interchange entries that are symmetrically positioned with respect to the main diagonal to obtain the transpose. Hence a12 becomes a21, a31 becomes a13, and so forth. Also note that, if A is the given matrix, then we denote its transpose by AT. Section 7.2 p22

Definition Transposition of Matrices and Vectors 7.2 Matrix Multiplication Definition Transposition of Matrices and Vectors The transpose of an m × n matrix A = [ajk] is the n × m matrix AT (read A transpose) that has the first row of A as its first column, the second row of A as its second column, and so on. Thus the transpose of A in (2) is AT = [akj], written out (9) As a special case, transposition converts row vectors to column vectors and conversely. Section 7.2 p23

Rules for transposition are 7.2 Matrix Multiplication Rules for transposition are (10) CAUTION! Note that in (10d) the transposed matrices are in reversed order. Section 7.2 p24

Special Matrices Symmetric and Skew-Symmetric Matrices. 7.2 Matrix Multiplication Special Matrices Symmetric and Skew-Symmetric Matrices. Transposition gives rise to two useful classes of matrices. Symmetric matrices are square matrices whose transpose equals the matrix itself. Skew-symmetric matrices are square matrices whose transpose equals minus the matrix. Both cases are defined in (11) and illustrated by Example 8. (11) AT = A (thus akj = ajk), Symmetric Matrix AT = −A (thus akj = −ajk), hence ajj = 0). Skew-Symmetric Matrix Section 7.2 p25

Symmetric and Skew-Symmetric Matrices 7.2 Matrix Multiplication EXAMPLE 8 Symmetric and Skew-Symmetric Matrices For instance, if a company has three building supply centers C1, C2, C3, then A could show costs, say, ajj for handling 1000 bags of cement at center Cj, and ajk ( j ≠ k) the cost of shipping 1000 bags from Cj to Ck. Clearly, ajk = akj if we assume shipping in the opposite direction will cost the same. Section 7.2 p26

7.2 Matrix Multiplication Triangular Matrices. Upper triangular matrices are square matrices that can have nonzero entries only on and above the main diagonal, whereas any entry below the diagonal must be zero. Similarly, lower triangular matrices can have nonzero entries only on and below the main diagonal. Any entry on the main diagonal of a triangular matrix may be zero or not. Section 7.2 p27

Upper and Lower Triangular Matrices 7.2 Matrix Multiplication EXAMPLE 9 Upper and Lower Triangular Matrices Upper triangular Lower triangular Section 7.2 p28

7.2 Matrix Multiplication Diagonal Matrices. These are square matrices that can have nonzero entries only on the main diagonal. Any entry above or below the main diagonal must be zero. Section 7.2 p29

7.2 Matrix Multiplication If all the diagonal entries of a diagonal matrix S are equal, say, c, we call S a scalar matrix because multiplication of any square matrix A of the same size by S has the same effect as the multiplication by a scalar, that is, (12) AS = SA = cA. In particular, a scalar matrix, whose entries on the main diagonal are all 1, is called a unit matrix (or identity matrix) and is denoted by In or simply by I. For I, formula (12) becomes (13) AI = IA = A. Section 7.2 p30