Matrices and Vectors

Similar documents
Complex Numbers. James K. Peterson. September 19, Department of Biological Sciences and Department of Mathematical Sciences Clemson University

Complex Numbers. Outline. James K. Peterson. September 19, Complex Numbers. Complex Number Calculations. Complex Functions

Matrix Basic Concepts

MATH 320, WEEK 7: Matrices, Matrix Operations

Multiplying matrices by diagonal matrices is faster than usual matrix multiplication.

Phys 201. Matrices and Determinants

CS100: DISCRETE STRUCTURES. Lecture 3 Matrices Ch 3 Pages:

Matrices. Chapter Definitions and Notations

[ Here 21 is the dot product of (3, 1, 2, 5) with (2, 3, 1, 2), and 31 is the dot product of

CS 246 Review of Linear Algebra 01/17/19

Chapter 1: Systems of linear equations and matrices. Section 1.1: Introduction to systems of linear equations

1 Matrices and matrix algebra

Finite Math - J-term Section Systems of Linear Equations in Two Variables Example 1. Solve the system

Matrices. Math 240 Calculus III. Wednesday, July 10, Summer 2013, Session II. Matrices. Math 240. Definitions and Notation.

Mathematics 13: Lecture 10

Prepared by: M. S. KumarSwamy, TGT(Maths) Page

Matrix Multiplication

Linear Algebra V = T = ( 4 3 ).

Lecture 3: Matrix and Matrix Operations

Section 9.2: Matrices.. a m1 a m2 a mn

Linear Algebra and Matrix Inversion

10. Linear Systems of ODEs, Matrix multiplication, superposition principle (parts of sections )

Lecture 3 Linear Algebra Background

1 Last time: determinants

Definition 2.3. We define addition and multiplication of matrices as follows.

MATRICES. a m,1 a m,n A =

Elementary Row Operations on Matrices

SECTION 6.3: VECTORS IN THE PLANE

I = i 0,

. =. a i1 x 1 + a i2 x 2 + a in x n = b i. a 11 a 12 a 1n a 21 a 22 a 1n. i1 a i2 a in

Math 360 Linear Algebra Fall Class Notes. a a a a a a. a a a

Matrices: 2.1 Operations with Matrices

ICS 6N Computational Linear Algebra Matrix Algebra

Matrices BUSINESS MATHEMATICS

Section 9.2: Matrices. Definition: A matrix A consists of a rectangular array of numbers, or elements, arranged in m rows and n columns.

Chapter 2. Ma 322 Fall Ma 322. Sept 23-27

Linear Algebra Tutorial for Math3315/CSE3365 Daniel R. Reynolds

REFRESHER. William Stallings

Math 123, Week 2: Matrix Operations, Inverses

Basic Concepts in Linear Algebra

Matrix Solutions to Linear Systems of ODEs

Elementary Linear Algebra

Review of linear algebra

Review of Basic Concepts in Linear Algebra

MAC Module 2 Systems of Linear Equations and Matrices II. Learning Objectives. Upon completing this module, you should be able to :

Relations Graphical View

Matrix Operations. Linear Combination Vector Algebra Angle Between Vectors Projections and Reflections Equality of matrices, Augmented Matrix

Introduction to Matrix Algebra

Mathematics for Graphics and Vision

The SIR Disease Model Trajectories and MatLab

Elementary maths for GMT

Review from Bootcamp: Linear Algebra

Linear Algebra. The analysis of many models in the social sciences reduces to the study of systems of equations.

Systems of Linear Equations and Matrices

Kevin James. MTHSC 3110 Section 2.1 Matrix Operations

Matrix Algebra. Matrix Algebra. Chapter 8 - S&B

Dot Products, Transposes, and Orthogonal Projections

Math Linear Algebra Final Exam Review Sheet

Matrices Gaussian elimination Determinants. Graphics 2009/2010, period 1. Lecture 4: matrices

Systems of Linear Equations and Matrices

Numerical Analysis Lecture Notes

Matrix Algebra 2.1 MATRIX OPERATIONS Pearson Education, Inc.

Knowledge Discovery and Data Mining 1 (VO) ( )

Linear Systems of ODE: Nullclines, Eigenvector lines and trajectories

Notes. Relations. Introduction. Notes. Relations. Notes. Definition. Example. Slides by Christopher M. Bourke Instructor: Berthe Y.

Lecture 7. Econ August 18

Matrix Algebra: Definitions and Basic Operations

Fundamentals of Engineering Analysis (650163)

Finite Mathematics Chapter 2. where a, b, c, d, h, and k are real numbers and neither a and b nor c and d are both zero.

Linear Systems of ODE: Nullclines, Eigenvector lines and trajectories

Predator - Prey Model Trajectories are periodic

DS-GA 1002 Lecture notes 0 Fall Linear Algebra. These notes provide a review of basic concepts in linear algebra.

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2

A FIRST COURSE IN LINEAR ALGEBRA. An Open Text by Ken Kuttler. Matrix Arithmetic

Lecture 6: Geometry of OLS Estimation of Linear Regession

7.5 Operations with Matrices. Copyright Cengage Learning. All rights reserved.

MATH 315 Linear Algebra Homework #1 Assigned: August 20, 2018

Extreme Values and Positive/ Negative Definite Matrix Conditions

Linear Algebra March 16, 2019

2.1 Matrices. 3 5 Solve for the variables in the following matrix equation.

CSCI 239 Discrete Structures of Computer Science Lab 6 Vectors and Matrices

Designing Information Devices and Systems I Fall 2017 Official Lecture Notes Note 2

MATH Mathematics for Agriculture II

. a m1 a mn. a 1 a 2 a = a n

MAC Module 1 Systems of Linear Equations and Matrices I

Complex Numbers Class Work. Complex Numbers Homework. Pre-Calc Polar & Complex #s ~1~ NJCTL.org. Simplify using i b 4 3.

Materials engineering Collage \\ Ceramic & construction materials department Numerical Analysis \\Third stage by \\ Dalya Hekmat

n n matrices The system of m linear equations in n variables x 1, x 2,..., x n can be written as a matrix equation by Ax = b, or in full

Linear Algebra Review. Vectors

1 - Systems of Linear Equations

ICS141: Discrete Mathematics for Computer Science I

MTH 464: Computational Linear Algebra

Math 121 (Lesieutre); 9.1: Polar coordinates; November 22, 2017

Matrix Arithmetic. j=1

Matrix Dimensions(orders)

Chapter 4 - MATRIX ALGEBRA. ... a 2j... a 2n. a i1 a i2... a ij... a in

22A-2 SUMMER 2014 LECTURE 5

Designing Information Devices and Systems I Fall 2018 Lecture Notes Note 2

Lecture 8: Determinants I

Math Bootcamp An p-dimensional vector is p numbers put together. Written as. x 1 x =. x p

Transcription:

Matrices and Vectors James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University November 11, 2013

Outline 1 Matrices and Vectors 2 Vector Details 3 Matrix Details 4 Operations On Matrices

Abstract This lecture is going discuss vectors and matrices.

Matrices and Vectors A matrix A is a rectangular collection of real numbers A = 2 4 5 12 14 15 20 4 1 A is a 3 3 matrix as it has 3 rows and 3 columns. The number of rows and columns can be any positive integer. Column vectors have only 1 column. So V 7 V = 9 2 is a 3 1 matrix or a column vector. Row vectors have only 1 row. So W W = [ 7 9 2 ] is a 1 3 matrix or a row vector.

Matrices and Vectors The transpose of a matrix swaps the rows and columns. We denote this by a superscript T. 3 3 transpose is still 3 3. 2 4 5 12 14 15 20 4 1 T = 2 12 20 4 14 4. 5 15 1 3 1 transpose is 1 3. 7 9 2 T = [ 7 9 2 ] 1 3 transpose is 3 1. [ 7 9 2 ] T = 7 9 2

Matrices and Vectors Basic Operations Add and subtract matrices and vectors of same size component wise. scalar multiply or divide a matrix or vector means you multiply or divide each component. Examples: just do vectors as matrices similar. 7 8 2( 7) 4(8) = 46 2 9 4 3 = 2( 9) 4(3) = 30 2 6 2(2) 4( 6) = 28 There are also zero vectors and zero matrices of various sizes.

Vector Details Let s look at two dimensional column vectors. Let [ ] a V = c We graph this vector using its components as coordinates in the standard x y plane. We draw a line from the origin (0, 0) to (a, c) just like we would do for the complex number a + c i. This line has a length (a) 2 + (c) 2 and we denote the length of V by V. This is called the norm of V. Hence, the vector V has a representation with a = r cos(θ), c = r sin(θ) which is called the polar coordinate representation. See the next picture.

Vector Details V a c r y θ x A vector V can be identified with an order pair (a, c). The components (a, c) are graphed in the usual Cartesian manner as an ordered pair in plane. The magnitude of V is (a) 2 + (c) 2 which is shown on the graph as r. The angle associated with V is drawn as an arc of angle θ

Vector Details Example For the vector V = [ ] 5 3 find its magnitude, its associated angle and graph it carefully, Solution The magnitude is V = ( 5) 2 + (3) 2. This vector is in Quadrant 2 and so the associated angle is π tan 1 ( 3 5 ) = π.54 = 2.60 radians. The graph is for you to do.

Vector Details Example For the vector V = [ ] 8 2 find its magnitude, its associated angle and graph it carefully, Solution The magnitude is V = ( 8) 2 + ( 2) 2. This vector is in Quadrant 3 and so the associated angle is π + tan 1 ( 2 8 ) = π +.24 = 3.38 radians. The graph is for you to do.

Vector Details Homework 31 For each vector, find its magnitude, its associated angle, and graph it carefully. 31.1 [ ] 6 V = 7 31.2 31.3 31.4 V = V = V = [ ] 3 7 [ ] 2 5 [ ] 3 5

Matrix Details A matrix is a rectangular collection of real numbers organized like this: 2 4 5 1 12 14 15 6 20 4 1 2 8 14 5 11

Matrix Details A matrix is a rectangular collection of real numbers organized like this: 2 4 5 1 12 14 15 6 20 4 1 2 8 14 5 11 In this matrix, we have a collection of numbers which are organized into 4 rows and 4 columns. We call this a square matrix because the number of rows and columns are the same. This particular matrix has only positive or negative integers in it, but of course the number 0 could be used as well as real numbers like 1.2356, π and e. It is just easier to type integers!

Matrix Details A matrix can also have a different number of rows and columns.

Matrix Details A matrix can also have a different number of rows and columns. Consider the matrices shown below. which are a 5 4 matrix and a 4 3 matrix. We call the 5 4 and the 4 3 the sizes of these matrices. In general, if a matrix has m rows and n columns, we say its size is m n 2 4 5 1 12 14 15 6 20 4 1 2 8 14 5 11 2 23 7 3 4 5 1 14 15 6 4 1 2 14 5 11 23 7 3

Matrix Details We usually denote a matrix by a capital letter such as A.

Matrix Details We usually denote a matrix by a capital letter such as A. Each entry in a matrix can be labeled by the row and column it occurs in. Thus, the entry in row 2 and column 3 of a matrix A is labeled as A 23.

Matrix Details We usually denote a matrix by a capital letter such as A. Each entry in a matrix can be labeled by the row and column it occurs in. Thus, the entry in row 2 and column 3 of a matrix A is labeled as A 23. For example A 11 A 12 A 13 A 14 B = A 21 A 22 A 23 A 24 A 31 A 32 A 33 A 34 A 41 A 42 A 43 A 44 = A 51 A 52 A 53 A 54 2 4 5 1 12 14 15 6 20 4 1 2 8 14 5 11. 2 23 7 3

Matrix Details There are some special matrices. A matrix that only has 0 as its entries is called a zero matrix.

Matrix Details There are some special matrices. A matrix that only has 0 as its entries is called a zero matrix. Now, since there are matrices of all different sizes, we can not pick just one to call the zero matrix. So when we are working on a problem, we just use the size of the zero matrix that is appropriate for the problem s context. For example, a 4 3 zero matrix would be 0 0 0 0 = 0 0 0 0 0 0 0 0 0

Matrix Details There are some special matrices. A matrix that only has 0 as its entries is called a zero matrix. Now, since there are matrices of all different sizes, we can not pick just one to call the zero matrix. So when we are working on a problem, we just use the size of the zero matrix that is appropriate for the problem s context. For example, a 4 3 zero matrix would be 0 0 0 0 = 0 0 0 0 0 0 0 0 0 A 2 2 zero matrix would be 0 = [ ] 0 0 0 0

Matrix Details Square matrices often occur in our work, i.e. matrices that have the same number of rows and columns. Consider A 11 A 12 A 13 A 14 2 4 5 1 A = A 21 A 22 A 23 A 24 A 31 A 32 A 33 A 34 = 12 14 15 6 20 4 1 2 A 41 A 42 A 43 A 44 8 14 5 11

Matrix Details A square matrix has three important parts which you are subsets of the original matrix. The Lower Triangular Part of A is L given by A 11 0 0 0 L = A 21 A 22 0 0 A 31 A 32 A 33 0 A 41 A 42 A 43 A 44

Matrix Details A square matrix has three important parts which you are subsets of the original matrix. The Lower Triangular Part of A is L given by A 11 0 0 0 L = A 21 A 22 0 0 A 31 A 32 A 33 0 A 41 A 42 A 43 A 44 The Upper Triangular Part of A is U given by A 11 A 12 A 13 A 14 U = 0 A 22 A 23 A 24 0 0 A 33 A 34 0 0 0 A 44

Matrix Details The Diagonal Part of A is D given by A 11 0 0 0 D = 0 A 22 0 0 0 0 A 33 0 = 0 0 0 A 44 2 0 0 0 0 14 0 0 0 0 1 0 0 0 0 11

Matrix Details The Diagonal Part of A is D given by A 11 0 0 0 D = 0 A 22 0 0 0 0 A 33 0 = 0 0 0 A 44 2 0 0 0 0 14 0 0 0 0 1 0 0 0 0 11 We can also define what is called the identity matrix. An identity matrix is a square matrix whose only nonzero entries are one s on the diagonal. For example, 1 0 0 I = 0 1 0 0 0 1 is a 3 3 identity matrix,

Matrix Details Consider the 5 4 matrix A defined by A = 2 4 5 1 12 14 15 6 20 4 1 2 8 14 5 11 2 23 7 3 The transpose of A is the matrix formed by switching the rows and columns of A.

Matrix Details Consider the 5 4 matrix A defined by A = 2 4 5 1 12 14 15 6 20 4 1 2 8 14 5 11 2 23 7 3 The transpose of A is the matrix formed by switching the rows and columns of A. We denote this new matrix by A T or sometimes A. Hence, 2 12 20 8 2 A T = 4 14 4 14 23 5 15 1 5 7 1 6 2 11 3

Matrix Details If a matrix A equals its own transpose, then first, we know A must be a square matrix of size n n for some positive integer n.

Matrix Details If a matrix A equals its own transpose, then first, we know A must be a square matrix of size n n for some positive integer n. Thus, ( A T) ij = A ij = A ji In this case, we say A is symmetric

Matrix Details If a matrix A equals its own transpose, then first, we know A must be a square matrix of size n n for some positive integer n. Thus, ( A T) ij = A ij = A ji In this case, we say A is symmetric Thus, the matrix A below is symmetric. A = 2 12 20 8 12 14 4 14 20 4 1 5 8 14 5 11

Matrix Details Homework 32 32.1 Find the transpose of [ 2 3 ] 4 1 4 90 32.2 Find the transpose of 2 3 4 11 4 9 6 3 8 32.3 Is this matrix symmetric? 2 3 4 3 4 3 4 3 8

Operations On Matrices We can also perform many operations on matrices. It is easiest to show these operations with examples. We can add matrices of the same size by adding their components 1 2 3 20 3 11 4 1 8 + 16 9 5 = 7 6 12 16 2 8 1 20 2 + 3 3 11 4 + 16 1 + 9 8 + 5 = 7 + 16 6 + 2 12 8 19 1 8 20 10 3 9 8 4

Operations On Matrices We can subtract matrices of the same size by subtracting their components 1 2 3 20 3 11 4 1 8 16 9 5 = 7 6 12 16 2 8 1 20 2 3 3 11 21 5 14 4 16 1 9 8 5 = 12 8 13 7 16 6 2 12 8 23 4 20

Operations On Matrices We can scale a matrix by multiplying each component of the matrix by the same number 1 2 3 3 6 9 3 4 1 8 = 12 3 24 7 6 12 21 18 36

Operations On Matrices We can multiply two matrices A and B if their sizes are just right. The number of columns of A must match the number of rows of B.

Operations On Matrices We can multiply two matrices A and B if their sizes are just right. The number of columns of A must match the number of rows of B. In the example below, the number of columns of the first matrix is 3 which matches the number of rows in the second matrix. So the matrix multiplication is defined. Since the size of A is 4 3 and the size of B is 3 2, the size of the product will be 4 2. In this example, each row of the first matrix has 3 entries and each column of the second matrix has 3 rows. Look at row 1 of the first matrix and column 1 of the second matrix.

Operations On Matrices We multiply row 1 and column 1 like this: [ ] 20 1 2 3 16 = (1)( 20) + ( 2)(16) + (3)(16). 16

Operations On Matrices We multiply row 1 and column 1 like this: [ ] 20 1 2 3 16 = (1)( 20) + ( 2)(16) + (3)(16). 16 In general, we would have for the i th row of A and the j th column of B [ ] B 1j Ai1 A i2 A i3 B 2j = B 3j 3 (A i1 )(B 1j ) + (A i2 )(B 2j ) + (A i3 )(B 3j ) = A ik B kj. k=1 where the individual components of A are denoted by A ij and those of B by B ij for appropriate indices i and j.

Operations On Matrices Hence, the full matrix multiplication of these two matrices is given by 1 2 3 4 1 8 7 6 12 20 3 16 9 16 2 12 2 3 (1)( 20) + ( 2)(16) + (3)(16) (1)(3) + ( 2)(9) + (3)(2) = (4)( 20) + (1)(16) + ( 8)(16) (4)(3) + (1)(9) + ( 8)(2) ( 7)( 20) + (6)(16) + (12)(16) ( 7)(3) + (6)(9) + (12)(2) (12)( 20) + ( 2)(16) + (3)(16) (12)(3) + ( 2)(9) + (3)(2) 20 + 32 + 48 3 + 18 + 6 4 9 = 80 + 16 + 128 12 + 9 + 16 140 + 96 + 192 21 + 54 + 24 = 192 5 428 57 240 + 32 + 48 36 + 18 + 6 224 24

Operations On Matrices If A is a square matrix of size n n, then if I denotes the identity matrix of size n n, both multiplications I A and A I are possible and give the answer A. This is why I is called the identity matrix!

Operations On Matrices If A is a square matrix of size n n, then if I denotes the identity matrix of size n n, both multiplications I A and A I are possible and give the answer A. This is why I is called the identity matrix! If A is a matrix of any size and 0 is the appropriate zero matrix of the same size, then both 0 + A and A + 0 are nicely defined operations and the result is just A.

Operations On Matrices If A is a square matrix of size n n, then if I denotes the identity matrix of size n n, both multiplications I A and A I are possible and give the answer A. This is why I is called the identity matrix! If A is a matrix of any size and 0 is the appropriate zero matrix of the same size, then both 0 + A and A + 0 are nicely defined operations and the result is just A. Matrix multiplication is not commutative: i.e. for square matrices A and B, the matrix product A B is not necessarily the same as the product B A.

Operations On Matrices Homework 33 33.1 Compute 1.0 2.5 6.0 8.0 1.0 2.5 3.0 4.2 12.0 2 5 7 33.2 Compute 1.0 2.5 6.0 5 8.0 1.0 2.5 8.2 3.0 4.2 12.0 6.1 2 5 7 10 0.3 8 1 1 2 6 16.5 2

Operations On Matrices Homework 33 Continued Consider 1.0 2.5 6.0 5 2 5 7 9 C = 8.0 1.0 2.5 8.2 3.0 4.2 12.0 6.1 and D = 10 0.3 8 10 1 1 2 5 2 3 7.2 9.4 6 16.5 2 14 33.3 Compute C + D 33.4 Compute C D 33.5 Compute 2C + 3D 33.6 Compute 4C + 5D 33.7 Compute C D D C