EE263 Review Session 1

Similar documents
Answers in blue. If you have questions or spot an error, let me know. 1. Find all matrices that commute with A =. 4 3

Matrices: 2.1 Operations with Matrices

Matrices. Chapter Definitions and Notations

Math 314/814 Topics for first exam

Linear Algebra (Review) Volker Tresp 2018

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

Math 4377/6308 Advanced Linear Algebra

Kevin James. MTHSC 3110 Section 2.1 Matrix Operations

Matrix Arithmetic. j=1

Ma/CS 6b Class 12: Graphs and Matrices

Linear Algebra, Summer 2011, pt. 2

Elementary maths for GMT

Dot Products, Transposes, and Orthogonal Projections

CS 246 Review of Linear Algebra 01/17/19

Recitation 8: Graphs and Adjacency Matrices

Quantum Computing Lecture 2. Review of Linear Algebra

Review of Linear Algebra

Chapter 2. Matrix Arithmetic. Chapter 2

= main diagonal, in the order in which their corresponding eigenvectors appear as columns of E.

Linear Algebra II. 2 Matrices. Notes 2 21st October Matrix algebra

1 Last time: inverses

Lecture 3: Matrix and Matrix Operations

7.6 The Inverse of a Square Matrix

Matrices and Vectors

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

Math 240 Calculus III

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

Chapter 1 Matrices and Systems of Equations

BASIC NOTIONS. x + y = 1 3, 3x 5y + z = A + 3B,C + 2D, DC are not defined. A + C =

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

Chapter 2. Vector Space (2-4 ~ 2-6)

Linear Equations and Matrix

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

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

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

22m:033 Notes: 3.1 Introduction to Determinants

Review 1 Math 321: Linear Algebra Spring 2010

Calculus II - Basic Matrix Operations

Section 12.4 Algebra of Matrices

What is A + B? What is A B? What is AB? What is BA? What is A 2? and B = QUESTION 2. What is the reduced row echelon matrix of A =

Matrix & Linear Algebra

Final Project # 5 The Cartan matrix of a Root System

Matrix operations Linear Algebra with Computer Science Application

Math Linear Algebra Final Exam Review Sheet

3 (Maths) Linear Algebra

GAUSSIAN ELIMINATION AND LU DECOMPOSITION (SUPPLEMENT FOR MA511)

ICS 6N Computational Linear Algebra Matrix Algebra

Linear Algebra (Review) Volker Tresp 2017

Determinants in detail

Mathematics 13: Lecture 10

Linear Programming Duality P&S Chapter 3 Last Revised Nov 1, 2004

MODEL ANSWERS TO THE FIRST QUIZ. 1. (18pts) (i) Give the definition of a m n matrix. A m n matrix with entries in a field F is a function

Chapter 7 Network Flow Problems, I

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

I = i 0,

Fall Inverse of a matrix. Institute: UC San Diego. Authors: Alexander Knop

Linear Algebra V = T = ( 4 3 ).

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

MA 0540 fall 2013, Row operations on matrices

Solutions to Exam I MATH 304, section 6

ME751 Advanced Computational Multibody Dynamics

Mathematics for Graphics and Vision

GEOMETRY OF MATRICES x 1

APPENDIX A. Background Mathematics. A.1 Linear Algebra. Vector algebra. Let x denote the n-dimensional column vector with components x 1 x 2.

Linear Systems. Math A Bianca Santoro. September 23, 2016

MIT Final Exam Solutions, Spring 2017

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

1 Determinants. 1.1 Determinant

The Theory of the Simplex Method. Chapter 5: Hillier and Lieberman Chapter 5: Decision Tools for Agribusiness Dr. Hurley s AGB 328 Course

4 ORTHOGONALITY ORTHOGONALITY OF THE FOUR SUBSPACES 4.1

(a) If A is a 3 by 4 matrix, what does this tell us about its nullspace? Solution: dim N(A) 1, since rank(a) 3. Ax =

Definition 1. A set V is a vector space over the scalar field F {R, C} iff. there are two operations defined on V, called vector addition

Matrices. Chapter What is a Matrix? We review the basic matrix operations. An array of numbers a a 1n A = a m1...

Matrices MA1S1. Tristan McLoughlin. November 9, Anton & Rorres: Ch

Lecture 3 Linear Algebra Background

EE731 Lecture Notes: Matrix Computations for Signal Processing

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

Determinants of 2 2 Matrices

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

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

Math 54 HW 4 solutions

a s 1.3 Matrix Multiplication. Know how to multiply two matrices and be able to write down the formula

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

Math 307: Problems for section 2.1

7 Matrix Operations. 7.0 Matrix Multiplication + 3 = 3 = 4

Solution Set 3, Fall '12

Linear algebra for computational statistics

CMU CS 462/662 (INTRO TO COMPUTER GRAPHICS) HOMEWORK 0.0 MATH REVIEW/PREVIEW LINEAR ALGEBRA

Linear Algebra and Matrix Inversion

Properties of Matrices and Operations on Matrices

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

Chapter 5. Finite Automata

Solving a system by back-substitution, checking consistency of a system (no rows of the form

Throughout these notes we assume V, W are finite dimensional inner product spaces over C.

Linear Algebra Review

Solution Set 7, Fall '12

MTH5112 Linear Algebra I MTH5212 Applied Linear Algebra (2017/2018)

II. Determinant Functions

1 Positive definiteness and semidefiniteness

Elementary Linear Algebra

Transcription:

EE263 Review Session 1 October 5, 2018 0.1 Importing Variables from a MALAB.m file If you are importing variables given in file vars.m, use the following code at the beginning of your script. close a l l ; c l e a r v a r s ; vars ; 1.1 Matrix-Vector Multiplication Review In class, we saw two ways we can view the matrix-vector multiplication y = Ax, A R m n 1. Columns: y is a linear combination of the columns of A. Consider the columns of A, a j for j 1, 2,..., n}: A = a 1 a 2... a n he vector y is a linear combination of A s columns a j with coefficients x j, the jth component of x: ( ) y = Ax = A x j e j = x j Ae j = x j a j = y = x j a j 2. Rows: Each component of y is the inner product a row of A with x. Consider the rows of A, ã i for i 1, 2,..., m}: ã 1 ã 2 A =. a m Each entry of y is the inner product of the corresponding row of A with x, defining a hyperplane: y = Ax = y i = ã i x 1

1.2 Nullspace Review We defined the nullspace of matrix A R m n, denoted by N(A) as follows: N(A) = x R n Ax = 0} Note that the nullspace of a matrix, N(A), happens to be a vector space (and a subspace of R n ). his means it has to satisfy a few properties: 1. he zero vector 0 N(A) 2. Closure under addition 3. Closure under scalar multiplication he nullspace includes 0 since A0 = 0. We can show the second two properties together. Consider α 1, α 2 R and v 1, v 2 N(A). We must show that α 1 v 1 + α 2 v 2 N(A): A (α 1 v 1 + α 2 v 2 ) = α 1 Av 1 + α 2 Av 2 = α 1 0 + α 2 0 = 0 hus, the nullspace N(A) is a vector space and subspace of R n. What if N(A) = 0}? All of the following statements are equivalent to each other. It s helpful to reason through each of them. 1. N(A) = 0} 2. x is uniquely determined from y = Ax 3. he mapping from x to y = Ax is one-to-one (different x s map to different y s) 4. he columns of A are independent 5. A has a left inverse, i.e., matrix B R n m s.t. BA = I 6. A A is invertible 2.1 Ex 1: Finding an unknown point on a sphere with rangings Consider a unit sphere S n R n : S n = x R n x 2 = 1}. We want to place k beacons on the sphere p 1, p 2,..., p k S n such that given the distance along the sphere from p i to an unknown point x S n for all i = 1, 2,..., k, we can uniquely determine x. More concretely, you re given d i = sphdist(x, p i ) = for i 1, 2,..., k}. Since this is a unit sphere, the distance along the sphere (arc length) is the same as the angle between x and p i, (x, p i ). We assume we always are given the shortest distance so that sphdist(x, p i ) [0, π]. We want to find conditions on the p i s such that we can always unambiguously determine x S n from the d i s. 2

Solution: We want to turn the spherical distance into something easier to work with. We note that there is a relationship between d i = (x, p i ) and p i x. Specifically, p i x = p i x cos d i = cos d i. Since p i = x = 1, as these points lie on S n, we can arrange these k equations in a matrix format. cos d 1 p 1 cos d 2 y =. = p 2. x = Ax cos d k p k We want the equation above to have exactly one solution so that we can determine the point x unambiguously. his is equivalent to needing N(A) = 0}. 3.2 Matrix-Matrix Multiplication In class, we saw four ways we can view the matrix-matrix multiplication C = AB, where A R m n and B R n p, which tells us that C R m p. 1. Element-wise: c i,j is the inner product of a row of A with a column of B. Consider the rows of A, ã i for i 1, 2,..., m} and the columns of B, b j for j 1, 2,..., p} ã 1 C = AB =. b 1... b p = c i,j = ã i b j = a i,k b k,j a m 2. Columns of B: Each column of C is A times a column of B. C = AB = A b 1... b p = Ab 1... Ab p 3. Rows of A: Each row of C is a row of A multiplied by B. ã 1 ã 1 B C = AB =. B =. a m a m B 4 Outer Products: of each column of A and row of B. C = AB = a k bk 3

4.1 Ex 2. Graph Adjacency Matrix We define the Adjacency Matrix A for some non-directional graph with n nodes as 1 if node i is connected to node j a i,j = For example, consider the graph below. We can determine its adjacency matrix A. 2 3 A = nodes 1 2 3 1 0 1 0 2 1 0 1 3 0 1 0 1 What is A r for some adjacency matrix A and some positive integer r? Solution: Let s start with the case k = 2. We have [ ] A 2 = a i,j i,k a k,j We can examine each of the summands a i,k a k,j. Note that each element of A can only take on the values 0 or 1, so the product equals 1 iff each multiplicand equals 1, which is only the case when both i & k and k & j are connected 1 if node i is connected to node j through node k a i,k a k,j = We sum this quantity for all n nodes in the graph, thus a i,k a k,j = the number of paths from i to j through another node In other words, [A 2 ] i,j is the number of paths of length 2 from i to j, or equivalently the number of other nodes connected directly to both i and j. In the general case [A r ] i,j is the number of paths of length r. We could prove this using an inductive argument. Aside: his might look similar to HW1, Q8. here, we worked with a directed graph, but the problem could be formulated as counting the a number of ways to traverse a graph that had certain properties. Graphs can come up in all sorts of applications, from modeling interactions in social networks to routing traffic through various types of transportation systems. 4

4.2 Ex 3. Incidence Matrices in Directed Graphs Consider some directed graph (i.e., the edges are one-way, instead of two-way) that has n nodes and m edges. Consider the incidence matrix (or arc-node incidence matrix) A R n m +1 if edge j enters node i a i,j = 1 if edge j exits node i Assume you re given x R m such that x j is the amount of flow in edge j. What does the product Ax represent? Solution: Define y = Ax. First we note that y R n, so it must say something about each of the nodes. Consider one of the entries y i. We can write this as y i = ã i x = a i,j x j We know that a i,j only takes values in 0, ±1}. Working through the cases, we have +x j if edge j enters node i a i,j x j = x j if edge j exits node i We conclude that y i is the net amount of flow into node i. 4.2.1 What does the matrix M = AA represent? Solution: First, a quick dimensions check tells us that M R n n, so we expect this matrix to tell us something about relationships between the nodes. We can split this product into two parts: the entries on the diagonal of M, and the entries off the diagonal. ã 1 M = AA =. ã 1... ã n = m i,i = ã i ã i = a 2 i,j ã n Going back to the definition of the incidence matrix, we see that a 2 i,j equals 1 if node j either enters or exits node i, and. We sum this other all edges, thus m i,i = the number of edges connected to node i (also called the degree of node i) Similarly we look at the entries off the diagonal and examine the summands. m i,j = ã i ã j = 5 a i,k a j,k

a i,k a j,k = 1 if edge k enters node i and exits node j, or vice versa We sum this over all the edges, so we will see if i and j are connected by one of them. 1 if nodes i and j are connected m i,j = Note that I assumed there exists only one edge between nodes (which has some direction). However, if you consider multiple edges between each node (multigraph), or the possibility of both directed and non-directed edges (which we could view as two edges between the nodes, one in each direction), the definition of m i,j would change slightly. In fact in the formulation above, a single edge k cannot both enter and exit a node i, as that would require a i,k to be ±1 simultaneously. his means there are no self-loops (edges from i to i) or bidirectional edges. 6