Arrays: Vectors and Matrices

Similar documents
Matrices BUSINESS MATHEMATICS

Lecture 3: Matrix and Matrix Operations

Phys 201. Matrices and Determinants

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

Linear Algebra V = T = ( 4 3 ).

Matrices: 2.1 Operations with Matrices

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

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

POLI270 - Linear Algebra

Topics. Vectors (column matrices): Vector addition and scalar multiplication The matrix of a linear function y Ax The elements of a matrix A : A ij

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

CLASS 12 ALGEBRA OF MATRICES

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

1 Matrices and matrix algebra

The word Matrices is the plural of the word Matrix. A matrix is a rectangular arrangement (or array) of numbers called elements.

Elementary maths for GMT

Basic Concepts in Linear Algebra

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

Instruction: Operations with Matrices ( ) ( ) log 8 log 25 = If the corresponding elements do not equal, then the matrices are not equal.

Review of Basic Concepts in Linear Algebra

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

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

Section 12.4 Algebra of Matrices

Matrices and Linear Algebra

Matrix Basic Concepts

Matrix Dimensions(orders)

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.

Calculus II - Basic Matrix Operations

MATRICES AND MATRIX OPERATIONS

Introduction to Matrices

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

Matrix Algebra: Definitions and Basic Operations

Properties of Matrix Arithmetic

Definition. A matrix is a rectangular array of numbers enclosed by brackets (plural: matrices).

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

Elementary Row Operations on Matrices

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

MATRICES The numbers or letters in any given matrix are called its entries or elements

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

Review from Bootcamp: Linear Algebra

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

Review of linear algebra

MATH.2720 Introduction to Programming with MATLAB Vector and Matrix Algebra

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

Matrix Multiplication

Introduction. Vectors and Matrices. Vectors [1] Vectors [2]

ICS 6N Computational Linear Algebra Matrix Algebra

Kevin James. MTHSC 3110 Section 2.2 Inverses of Matrices

A primer on matrices

Matrix Algebra. Learning Objectives. Size of Matrix

Chapter 2. Matrix Arithmetic. Chapter 2

DM559 Linear and Integer Programming. Lecture 3 Matrix Operations. Marco Chiarandini

A Review of Matrix Analysis

a11 a A = : a 21 a 22

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

Lecture 3 Linear Algebra Background

Stage-structured Populations

Matrices. Chapter Definitions and Notations

Matrix Algebra Determinant, Inverse matrix. Matrices. A. Fabretti. Mathematics 2 A.Y. 2015/2016. A. Fabretti Matrices

Two matrices of the same size are added by adding their corresponding entries =.

A matrix is a rectangular array of. objects arranged in rows and columns. The objects are called the entries. is called the size of the matrix, and

Chapter 2 Notes, Linear Algebra 5e Lay

A matrix is a rectangular array of. objects arranged in rows and columns. The objects are called the entries. is called the size of the matrix, and

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

8-15. Stop by or call (630)

Matrix Arithmetic. (Multidimensional Math) Institute for Advanced Analytics. Shaina Race, PhD

Matrix Algebra 2.1 MATRIX OPERATIONS Pearson Education, Inc.

Linear Algebra review Powers of a diagonalizable matrix Spectral decomposition

We use the overhead arrow to denote a column vector, i.e., a number with a direction. For example, in three-space, we write

Matrices and Vectors

7.3. Determinants. Introduction. Prerequisites. Learning Outcomes

Review of Linear Algebra

September 23, Chp 3.notebook. 3Linear Systems. and Matrices. 3.1 Solve Linear Systems by Graphing

Matrix representation of a linear map

Linear Algebra (Review) Volker Tresp 2017

10: Representation of point group part-1 matrix algebra CHEMISTRY. PAPER No.13 Applications of group Theory

Introduction to Matrix Algebra

Linear Algebra, Vectors and Matrices

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

Linear Algebra (Review) Volker Tresp 2018

Matrices. Background mathematics review

Unit 1 Matrices Notes Packet Period: Matrices

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

5.1 Introduction to Matrices

Graphics (INFOGR), , Block IV, lecture 8 Deb Panja. Today: Matrices. Welcome

Matrix representation of a linear map

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

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

Mathematics for Graphics and Vision

Matrix Arithmetic. j=1

For comments, corrections, etc Please contact Ahnaf Abbas: Sharjah Institute of Technology. Matrices Handout #8.

Introduction to Matrices

Getting Started with Communications Engineering. Rows first, columns second. Remember that. R then C. 1

Lecture 6: Geometry of OLS Estimation of Linear Regession

Matrix notation. A nm : n m : size of the matrix. m : no of columns, n: no of rows. Row matrix n=1 [b 1, b 2, b 3,. b m ] Column matrix m=1

Linear Algebra Section 2.6 : LU Decomposition Section 2.7 : Permutations and transposes Wednesday, February 13th Math 301 Week #4

Basic Linear Algebra in MATLAB

Chapter 5. Linear Algebra. A linear (algebraic) equation in. unknowns, x 1, x 2,..., x n, is. an equation of the form

Linear Algebra and Matrix Inversion

Exercise Set Suppose that A, B, C, D, and E are matrices with the following sizes: A B C D E

Transcription:

Arrays: Vectors and Matrices Vectors Vectors are an efficient notational method for representing lists of numbers. They are equivalent to the arrays in the programming language "C. A typical vector might represent the high temperature every day for a week. Such a vector would have seven elements and could be written as a row vector (a single row), HighTemp = 25 33 38 3 5 [ ] or as a column vector (a single column), 25 32 33 HighTemp = 38 3 5 Note, that I will use bold letters when referring to the entire vector (or matrix). In both cases above, the HighTemp vector has seven elements, representing Sunday through Saturday. To access the individual elements in the array we use an index. For example, the temperature Sunday would be accessed as HighTemp(), and is equal to 25. Likewise HighTemp()=38 is Wednesday's high temperature. Matrices A matrix (singular of matrices) is for our purposes a series of numbers listed in two dimensions. As an example, consider high temperatures collected over a 28 day period ( weeks). We could write the matrix as a single list 28 elements long, or as a collection of numbers (a matrix) that has rows and 7 columns. 25 33 38 3 5 2 3 5 6 8 39 HighTemp = 39 3 7 8 8 7 50 9 5 8 50 5 53 Now we need two indices to represent the numbers, one for the row, and one for the column. For example the high temperature on the 3 rd day of the 2 nd week is HighTemp(2,3) and is equal to 5. Note that the index for the row comes first. We could also write the matrix with rows and columns interchanged. This is referred to as taking the "transpose" of the matrix. 25 9 50 32 3 9 33 5 3 5 HighTemp = 38 6 7 8 3 8 8 50 5 8 5 39 7 53

Note that a vector is the special case of a matrix, where there is only one row or column. Also note that the two vectors given are transposes of each other. In general a matrix consisting of m n elements can be arranged in m rows and n columns, yielding an mxn (read m by n) matrix, which we'll call A. a a2 an a2 a22 a 2n A = am am2 amn The symbol a ij represents the number in the i th row and the j th column. Matrix operations For the ensuing discussion assume we have three matrices A 0 3 =,, = = B C Equality Two matrices are equal if they are the same size, and corresponding elements are equal. For example, A=B, but A C. Addition Two matrices can be added if they are the same size. Their sum is given by a third matrix whose elements are the sum of the corresponding elements being added.of the two arrays If D=A+C then 7 A+ C= D = 3 5 Note that A+B=B+A. Operations with a scalar A matrix can be multiplied by a scalar (a scalar is a single number) by multiplying each element of the array by that number. The same can be done with addition, subtraction of division with a scalar. For example: 2 8 2 A = D = 6 To convert the temperatures from the first example to Celsius: CelcTemp=(HighTemp-32)*5/9

Multiplication of two vectors A row vector can be multiplied by a column vector, in that order, to yield a scalar if and only if the have the same number of elements. If v v 2 u= [ u u2 u n], v= v n then For example:. uv = uv + u v + + uv, oruv = uv 2 n n i i i= 2 3 5 = 2 + 3 + 56 = 6 [ ] Multiplication of two matrices Two matrices, A and C can be multiplied together in the order AC if and only if the number of columns in A equals the number of rows in C (in other words, the inner dimensions are equal). If D=AC, then d ij is the element obtained by multiplying the row vector represented by the i th row of A by the column vector represented by the j th column of C. For arrays A and C with n columns and rows, respectively, we get: n dij = aikckj For example, if D=AC, using the matrices given previously Note that in general AC CA. In this case 0 3 0 + 3 + 2 D= AC = = = 20 + 3 23 + 32 3 2 E 0 3 6 9 = CA = = 5 0 D k= n Important matrices Identity Matrix There is a special matrix called the identity matrix. This is a square matrix has one's along the main diagonal, and 0's elsewhere. Shown are 2x2 and x identity matrices. 0 0 0 0 0 0 I = = I 0 0 0 0 The identity matrix has the special property that for a square matrix A, AI=IA=A Inverse Matrix If the matrix A has an inverse G, we write G=A -, and GA=AG=I. Note that some matrices don't have inverses.

Review - Vectors and Matrices For the following problems let: 2 3 3 0 3 A=,,, [, ] B= I= = = U V 3 3. What is a 2? 2. What is a 2? 3. What is A+B?. What is UV? 5. What is AB? 6. What is AI? 7. What is IA? 8. What is VU? 9. What is BA? 0. How could you use matrix multiplication to find the average of each row of the matrix A?. How could you use matrix multiplication to find the average of each column of the matrix A?

Answers - Vectors and Matrices For the following problems let: 2 3 3 0 3 A=,,, [, ] B= I= = = U V 3 3. What is a 2? - 2. What is a 2? 3. What is A+B?. What is UV? 5. What is AB? 6. What is AI? 2 2 3 3 2 2 3 3 0 7. What is IA? (Note, in this case IA=AI, multiplication isn't generally commutative). 8. What is VU? (Note, in this case UV VU, because multiplication isn't generally commutative). 3 6 8 9. What is BA? 0 0. How could you use matrix multiplication to find the average of each row of the matrix A? 0 2 = 3 2 2. How could you use matrix multiplication to find the average of each column of the matrix A? = 2 2 2