Basic matrix operations

Similar documents
Number of solutions of a system

Roberto s Notes on Linear Algebra Chapter 4: Matrix Algebra Section 4. Matrix products

Using matrices to represent linear systems

Roberto s Notes on Linear Algebra Chapter 9: Orthogonality Section 2. Orthogonal matrices

Roberto s Notes on Linear Algebra Chapter 4: Matrix Algebra Section 7. Inverse matrices

Special types of matrices

Matrix Algebra: Definitions and Basic Operations

Eigenvalues and eigenvectors

Basic methods to solve equations

Matrices. Chapter Definitions and Notations

Definition of geometric vectors

Math 308 Midterm Answers and Comments July 18, Part A. Short answer questions

Systems of equation and matrices

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

Dependence and independence

Roberto s Notes on Linear Algebra Chapter 10: Eigenvalues and diagonalization Section 3. Diagonal matrices

Example: 2x y + 3z = 1 5y 6z = 0 x + 4z = 7. Definition: Elementary Row Operations. Example: Type I swap rows 1 and 3

Inverses and Determinants

Determinants of 2 2 Matrices

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

Roberto s Notes on Linear Algebra Chapter 11: Vector spaces Section 1. Vector space axioms

[Disclaimer: This is not a complete list of everything you need to know, just some of the topics that gave people difficulty.]

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

Last Time. x + 3y = 6 x + 2y = 1. x + 3y = 6 y = 1. 2x + 4y = 8 x 2y = 1. x + 3y = 6 2x y = 7. Lecture 2

Topic 15 Notes Jeremy Orloff

Cofactors and Laplace s expansion theorem

. =. 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

(x 1 +x 2 )(x 1 x 2 )+(x 2 +x 3 )(x 2 x 3 )+(x 3 +x 1 )(x 3 x 1 ).

Calculus II - Basic Matrix Operations

A summary of factoring methods

Basic Linear Algebra in MATLAB

Mathematics 13: Lecture 10

Roberto s Notes on Linear Algebra Chapter 1: Geometric vectors Section 8. The dot product

CHAPTER 8: Matrices and Determinants

Linear Algebra Tutorial for Math3315/CSE3365 Daniel R. Reynolds

ENGI 9420 Lecture Notes 2 - Matrix Algebra Page Matrix operations can render the solution of a linear system much more efficient.

7.3. Determinants. Introduction. Prerequisites. Learning Outcomes

Chapter 1 Review of Equations and Inequalities

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

Chapter 2. Matrix Arithmetic. Chapter 2

Final Review Sheet. B = (1, 1 + 3x, 1 + x 2 ) then 2 + 3x + 6x 2

1 Matrices and matrix algebra

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

Homogeneous Linear Systems and Their General Solutions

Vector, Matrix, and Tensor Derivatives

Terminology and notation

Lecture 10: Powers of Matrices, Difference Equations

1.4 Mathematical Equivalence

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

12. Perturbed Matrices

Numerical Methods Lecture 2 Simultaneous Equations

Eigenvectors and Hermitian Operators

LECTURES 14/15: LINEAR INDEPENDENCE AND BASES

Numerical Linear Algebra

Math 344 Lecture # Linear Systems

Differential Equations

I = i 0,

A primer on matrices

A primer on matrices

MAC Module 1 Systems of Linear Equations and Matrices I

Linear Algebra Practice Problems

Numerical Methods Lecture 2 Simultaneous Equations

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

MATH 310, REVIEW SHEET 2

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

Midterm 1 Review. Written by Victoria Kala SH 6432u Office Hours: R 12:30 1:30 pm Last updated 10/10/2015

Numerical Analysis Lecture Notes

Lesson 21 Not So Dramatic Quadratics

Linear Algebra: Lecture Notes. Dr Rachel Quinlan School of Mathematics, Statistics and Applied Mathematics NUI Galway

JUST THE MATHS UNIT NUMBER 9.3. MATRICES 3 (Matrix inversion & simultaneous equations) A.J.Hobson

Matrices. Chapter Keywords and phrases. 3.2 Introduction

Math 123, Week 2: Matrix Operations, Inverses

1300 Linear Algebra and Vector Geometry

Chapter 4. Solving Systems of Equations. Chapter 4

Chapter 2. Linear Algebra. rather simple and learning them will eventually allow us to explain the strange results of

Kevin James. MTHSC 3110 Section 2.1 Matrix Operations

WSMA Algebra - Expressions Lesson 14

Math 220: Summer Midterm 1 Questions

Review of matrices. Let m, n IN. A rectangle of numbers written like A =

TOPIC III LINEAR ALGEBRA

Examples True or false: 3. Let A be a 3 3 matrix. Then there is a pattern in A with precisely 4 inversions.

NAME MATH 304 Examination 2 Page 1

1 Matrices and Systems of Linear Equations. a 1n a 2n

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

Name Solutions Linear Algebra; Test 3. Throughout the test simplify all answers except where stated otherwise.

Lecture Notes in Linear Algebra

MATH 320, WEEK 7: Matrices, Matrix Operations

1 Determinants. 1.1 Determinant

Introduction to Systems of Equations

Definition of Equality of Matrices. Example 1: Equality of Matrices. Consider the four matrices

Bridging the gap between GCSE and A level mathematics

3 The language of proof

Row Reduced Echelon Form

Part 1: You are given the following system of two equations: x + 2y = 16 3x 4y = 2

8-15. Stop by or call (630)

v = ( 2)

COMPOSITE KNOT DETERMINANTS

Chapter 8. Rigid transformations

#29: Logarithm review May 16, 2009

MATRICES AND MATRIX OPERATIONS

Transcription:

Roberto s Notes on Linear Algebra Chapter 4: Matrix algebra Section 3 Basic matrix operations What you need to know already: What a matrix is. he basic special types of matrices What you can learn here: How to combine and manipulate matrices in ways that will be fruitful later. Since matrices can be viewed as vectors, there is a natural way of generalizing to them the basic operations we have used for vectors. echnical fact wo matrices of the same dimensions may be added together entry-by entry, just as it is done with two vectors: a11 a12... a1 n b11 b12... b1 n a21 a22... a b21 b22... b...... aij......... bij... am1 am2... amn bm1 bm 2... bmn a11 b11 a12 b12... a1n b1 n a21 b21 a22 b22... a b...... aij bij... am1 bm 1 am2 bm 2... amn bmn echnical fact A matrix can be multiplied by a scalar entry-byentry, just as it is done for vectors: a11 a12... a1 n ca11 ca12... ca1 n a21 a22... a ca21 ca21... ca c...... aij......... caij... am1 am2... amn cam1 cam 1... cam 1 SO, I guess we can also construct linear combinations, right? Of course, and the way to do it is the obvious one. Linear Algebra Chapter 4: Matrix algebra Section 3: Basic matrix operations Page 1

echnical fact A linear combination of matrices can then be defined by using these two operations, just as it is done for vectors. a11 a12... a1 n b11 b12... b1 n a21 a22... a b21 b22... b c d...... aij......... bij... am1 am2... amn bm1 bm 2... bmn ca db ca db... ca db ca db ca db... ca db...... caij dbij... ca db ca db... ca db 11 11 12 12 1n 1n 21 21 22 22 m1 m1 m2 m2 mn mn his is one more reason in support of my original choice of notation for vectors: matrices are universally denoted by using square brackets and they are a special type of vectors, just as vectors are a special type of matrices, so why not use the same notation? Well, I do, so probably the onus to justify their choice is on those who don t! And I thought that mathematics is free of controversies! Not really! Controversies are an integral part of the mathematical world, since it is a world populated by humans. But for now, the more urgent task is to become more familiar with matrices, whatever notation we use, so let s get back there. Yes, but these operations seem fairly simple. hey are and they never seem to cause problems to students, so I will give you here is just one basic example. If you need more practice, infinitely many numbers will provide infinitely many more examples and exercise! 3 2 1 2 7 8 A,, B 2 3 1 1 2 C 3 4 We can add the first two matrices and obtain: 3 2 1 2 7 8 1 9 7 A B 2 3 1 4 8 1 We can also multiply C by a scalar: 1 0.5 1 C 2 1.5 2 Or we can take a linear combination of the first two: 3 2 1 2 7 8 2A 3B 2 3 2 3 1 6 4 2 6 21 24 12 17 26 4 10 0 6 9 3 2 1 3 Notice, however, that in this example we cannot add A and C or B and C, since in each case the two matrices involved do not have the same dimensions. Why can t we embed in into a larger matrix? We certainly can, as long as we are aware that we are doing it. o refresh your memory on this concept, here is how it applies to matrices. Linear Algebra Chapter 4: Matrix algebra Section 3: Basic matrix operations Page 2

Definition An mn matrix is embedded in M ( m h) ( n k ) by adding h rows and k columns all containing 0 entries. Unless otherwise needed, the additional rows and columns are added at the end. 3 2 1 A We can embed this matrix into M 2 5by adding two columns: A A 3 2 1 0 0 0 0 25 Or we can embed it into M 4 3by adding two rows: A A 3 2 1 0 0 0 0 0 0 43 Or we can embed it into M3 4by adding one row and one column: 3 2 1 0 A 0 0 0 0 0 Remember that these rows and columns can be added in different positions, but usually they are added at the end. Notice the connection of this embedding with something we have done earlier. Knot on your finger Embedding an mn matrix A into M m ( n k ) is equivalent to augmenting it with the matrix 0 mk. But earlier we augmented a matrix with a single column, while now we are adding several and we are even adding rows! Yes, but this is not a problem. Rather it is one of the advantages of generalizing: you can do the same thing in more than one way. Notice how this embedding allows us to add matrices of different dimensions when we need to: 3 2 1 1 2 A, C 3 4 We can embed C into M 2 3, so that we can add it to A: 3 2 1 1 2 0 4 4 1 A C 23 3 4 0 5 1 0 Can we also truncate a matrix? Of course, and this leads to another word for your linear algebra vocabulary. Linear Algebra Chapter 4: Matrix algebra Section 3: Basic matrix operations Page 3

Definition A matrix A in M ( m h) ( n k ) can be truncated to an mn matrix by deleting h rows and k columns that are not wanted or needed. In particular, the matrix obtained from a matrix A by truncating the p-th row and q-th column is called the (p, q) minor of A and it will be denoted by A ( pq, ). 2 3 1 0 2 1 5 2 B 3 2 2 1 1 0 7 3 We can truncate this matrix by deleting r 2, c 1 and c 4 : 2 3 1 0 3 1 2 1 5 2 B 2 2 3 2 2 1 0 7 1 0 7 3 Or we can see that its (2,3) minor is: 2 3 1 0 2 3 0 2 1 5 2 B B 2, 3 3 2 1 3 2 2 1 1 0 3 1 0 7 3 I am confident that, except for the adding of more jargon, you will find all these operations very easy. And so is the last operation we ll look at here. Since a matrix is a set of numbers organized over rows and columns, we can explore what happens by switching the roles of rows and columns. It turns out that this is a very useful operation: it will help us in many situations and will open new horizons of uses. But for now, let s just get used to the idea and the terminology. Definition Given a matrix A, its transpose is the matrix A obtained by writing all rows as columns in the same order. a11 a12... a1 n a11 a21... am 1 a21 a22... a a12 a22... a m2 A A...... aij......... aji... a a... a a a... a m1 m2 mn 1n mn Here is another way to look at it: Knot on your finger he entry in position (i, j) of A is the entry in position (j, i) of A. In particular, the elements aii of the diagonal are unchanged during transposition. If A is an mn matrix, then its transpose A is an nm matrix. Linear Algebra Chapter 4: Matrix algebra Section 3: Basic matrix operations Page 4

0 2 1 2 2 1 0 3 2 1 4 1 he transpose of B 3 1 4 is B 2 1 2. 1 2 2 5 1 1 2 2 3 5 he transpose of C 1 3 is C. echnical fact For any matrix A, it is true that A A 0 2 1 B 2 1 4 1 4 1 his matrix is symmetric, as you can tell from writing down its transpose. Can you see how the entries in mirror image positions across the diagonal are related? he matrix 1 2 C 1 3 2 5 cannot possibly be symmetric since it has more rows than columns, so that when we reverse them we cannot possibly get back the same matrix. he matrices of this last example highlight the following observations, which may be classified as technical facts, but are so simple that I chose not to. Well, duh! You are just reversing rows and columns again! Yes, but this small and obvious observation will come in handy on several occasions, so it deserves to be highlighted. It also leads to another easy addition to your linear algebra vocabulary. Definition A matrix is symmetric if it is equal to its transpose, that is, if A A. Knot on your finger All symmetric matrices are square matrices he entries that are mirror image across the diagonal of a symmetric matrix are equal: aij aji. On the other hand, the following property is very important and, though it looks obvious, it requires a little proof. Linear Algebra Chapter 4: Matrix algebra Section 3: Basic matrix operations Page 5

Proof echnical fact he sum of symmetric matrices is symmetric. If two square matrices A and B have the same dimensions and are A B A B. But symmetric, any entry of their sum is given by ij ij since they are symmetric we can write: A B A B A B A B ij ij ij ji ji But this shows that each entry is equal to the one in its symmetric position, so that the whole matrix is symmetric Why do we need a proof for such a simple fact? Because some mathematical statements that seem very simple, indeed obvious, sometimes are false! Remember that we are not dealing with individual real numbers, but with sets of numbers endowed with a specific ordering organization, so that things can go wrong and will go wrong in situations that we shall soon see. o give you more experience with this, the following fact is also easy to prove, and I leave it to you to develop its proof as an exercise. But we do need to prove it to be sure of its truth. We are getting deeper into the theoretical nature of linear algebra! ij ji echnical fact he transpose of the sum of two matrices of the same dimensions equals the sum of their transposes: A B A B 1 2 1 3 5 2 A 4 5 0 B 5 1 0 3 1 5 2 0 7 Let s verify this seemingly simple fact in this case. You can check that only B is symmetric and that: However: 2 7 1 2 9 1 A B 9 4 0 7 4 1 A B 1 1 12 1 0 12 1 4 3 3 5 2 2 9 1 A B 2 5 1 5 1 0 7 4 1 1 0 5 2 0 7 1 0 12 And the two are the same. Please notice that this exercise does NO constitute a proof, since we only verified one particular case, not the general one. he latter is for you to do! Linear Algebra Chapter 4: Matrix algebra Section 3: Basic matrix operations Page 6

Summary Matrices can be added, multiplied by a scalar and combined into linear combinations, since they are vectors. he additional structure into rows and columns allows us to devise an additional operation on transposition: switching rows and columns. Common errors to avoid Don t underestimate the concepts of this section: they are easy, but they are useful and used! So learn how to handle them properly. Learning questions for Section LA 4-3 Review questions: 1. Describe how to perform a linear combination of matrices. 2. Explain how to transpose a matrix. Memory questions: 1. What method is used to add two matrices or multiply a matrix by a scalar? 2. When is it possible to perform a linear combination of two matrices? 4. What do we call a matrix that is equal to its transpose? 5. In general, what is a different but equivalent way to write A B? 3. How is a matrix transposed? Linear Algebra Chapter 4: Matrix algebra Section 3: Basic matrix operations Page 7

heory questions: 1. Can a 34 matrix be symmetric? 2. Are diagonal matrices symmetric? 3. What are the dimensions of the transpose of a 3 5 matrix? 4. What type of matrix is 1 2 1 2 5 1 1 1 3? Proof questions: 1. Prove that the sum of two symmetric matrices is symmetric. 2. Prove that if A is upper triangular, B is lower triangular, and they have the same dimensions, then A+B is neither upper nor lower triangular, unless both A and B are both diagonal. 3. Prove that the transpose of an upper triangular matrix is lower triangular and vice-versa. 4. Prove that the transpose of a linear combination of matrices is the same linear combination of the transposes. 5. Prove that a linear combination of symmetric matrices is symmetric. 6. Prove or disprove that for any matrix A the matrix A A is symmetric. emplated questions: 1. Construct two matrices of the same dimensions (not too big and not too small!) and add them. 2. Construct a scalar and a matrix (not too big and not too small!) and multiply them. 3. Construct two scalars and two matrices of the same dimensions (not too big and not too small!) and construct a linear combination of them. 4. Construct a matrix (not too big and not too small!) and transpose it. What questions do you have for your instructor? Linear Algebra Chapter 4: Matrix algebra Section 3: Basic matrix operations Page 8