AN APPLICATION OF LINEAR ALGEBRA TO NETWORKS

Similar documents
Systems of Linear Equations

1 Counting spanning trees: A determinantal formula

Effective Resistance and Schur Complements

Spring 2015 Midterm 1 03/04/15 Lecturer: Jesse Gell-Redman

Chapter 4 & 5: Vector Spaces & Linear Transformations

Outline. Linear maps. 1 Vector addition is commutative: summands can be swapped: 2 addition is associative: grouping of summands is irrelevant:

Instructions Please answer the five problems on your own paper. These are essay questions: you should write in complete sentences.

MAT2342 : Introduction to Applied Linear Algebra Mike Newman, fall Projections. introduction

Dot Products, Transposes, and Orthogonal Projections

Lesson 3. Inverse of Matrices by Determinants and Gauss-Jordan Method

LS.1 Review of Linear Algebra

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

MA 0540 fall 2013, Row operations on matrices

Review of Linear Algebra Definitions, Change of Basis, Trace, Spectral Theorem

Math 308 Discussion Problems #4 Chapter 4 (after 4.3)

x n -2.5 Definition A list is a list of objects, where multiplicity is allowed, and order matters. For example, as lists

1 Last time: row reduction to (reduced) echelon form

This last statement about dimension is only one part of a more fundamental fact.

Chapter Two Elements of Linear Algebra

LECTURES 14/15: LINEAR INDEPENDENCE AND BASES

Linear Algebra. Preliminary Lecture Notes

Math 344 Lecture # Linear Systems

Kernel and range. Definition: A homogeneous linear equation is an equation of the form A v = 0

First of all, the notion of linearity does not depend on which coordinates are used. Recall that a map T : R n R m is linear if

Topics in linear algebra

Lecture 1 Systems of Linear Equations and Matrices

We know how to identify the location of a point by means of coordinates: (x, y) for a point in R 2, or (x, y,z) for a point in R 3.

Dot Products. K. Behrend. April 3, Abstract A short review of some basic facts on the dot product. Projections. The spectral theorem.

Algebraic Methods in Combinatorics

LINEAR ALGEBRA BOOT CAMP WEEK 1: THE BASICS

Exam 2 Solutions. (a) Is W closed under addition? Why or why not? W is not closed under addition. For example,

Abstract Vector Spaces and Concrete Examples

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

Linear Algebra, Summer 2011, pt. 2

22A-2 SUMMER 2014 LECTURE Agenda

Chapter SSM: Linear Algebra. 5. Find all x such that A x = , so that x 1 = x 2 = 0.

1111: Linear Algebra I

Lecture 2: Linear Algebra

a11 a A = : a 21 a 22

Exam 1 - Definitions and Basic Theorems

SECTION 3.3. PROBLEM 22. The null space of a matrix A is: N(A) = {X : AX = 0}. Here are the calculations of AX for X = a,b,c,d, and e. =

Math 314H Solutions to Homework # 3

MTH 362: Advanced Engineering Mathematics

Elementary Linear Algebra Review for Exam 2 Exam is Monday, November 16th.

Linear Algebra. Preliminary Lecture Notes

Solutions to Final Exam

The Matrix Vector Product and the Matrix Product

Math 54 HW 4 solutions

Walks, Springs, and Resistor Networks

10. Smooth Varieties. 82 Andreas Gathmann

MATH 323 Linear Algebra Lecture 12: Basis of a vector space (continued). Rank and nullity of a matrix.

Math 350 Fall 2011 Notes about inner product spaces. In this notes we state and prove some important properties of inner product spaces.

MAT 1302B Mathematical Methods II

Systems of Linear Equations

Chapter 2 Linear Transformations

a (b + c) = a b + a c

Kirchhoff s laws. Figur 1 An electric network.

A SHORT SUMMARY OF VECTOR SPACES AND MATRICES

MATH 2210Q Applied Linear Algebra, Fall 2016

Gaussian elimination

Math 291-2: Lecture Notes Northwestern University, Winter 2016

2. Every linear system with the same number of equations as unknowns has a unique solution.

Singular Value Decomposition. 1 Singular Value Decomposition and the Four Fundamental Subspaces

Math 110: Worksheet 3

18.06 Professor Johnson Quiz 1 October 3, 2007

Math 4377/6308 Advanced Linear Algebra

Definition Suppose S R n, V R m are subspaces. A map U : S V is linear if

The Integers. Peter J. Kahn

Starting with Two Matrices

Understanding the Simplex algorithm. Standard Optimization Problems.

Computational Approaches to Finding Irreducible Representations

Carleton College, winter 2013 Math 232, Solutions to review problems and practice midterm 2 Prof. Jones 15. T 17. F 38. T 21. F 26. T 22. T 27.

Review Let A, B, and C be matrices of the same size, and let r and s be scalars. Then

Lecture 18: The Rank of a Matrix and Consistency of Linear Systems

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

The Fundamental Theorem of Linear Algebra

Mathematics Department Stanford University Math 61CM/DM Vector spaces and linear maps

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

Linear Algebra I. Ronald van Luijk, 2015

MATH 2331 Linear Algebra. Section 2.1 Matrix Operations. Definition: A : m n, B : n p. Example: Compute AB, if possible.

1. Introduction to commutative rings and fields

Chapter 3. Loop and Cut-set Analysis

The geometry of least squares

b for the linear system x 1 + x 2 + a 2 x 3 = a x 1 + x 3 = 3 x 1 + x 2 + 9x 3 = 3 ] 1 1 a 2 a

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Linear Algebra /34

2. Limits at Infinity

Spectral Graph Theory Lecture 2. The Laplacian. Daniel A. Spielman September 4, x T M x. ψ i = arg min

MTH 35, SPRING 2017 NIKOS APOSTOLAKIS

Math 265 Midterm 2 Review

Introduction to Determinants

Tues Feb Vector spaces and subspaces. Announcements: Warm-up Exercise:

MAT 242 CHAPTER 4: SUBSPACES OF R n

Linear Algebra and Matrix Theory

The Four Fundamental Subspaces

Ordinary Differential Equations Prof. A. K. Nandakumaran Department of Mathematics Indian Institute of Science Bangalore

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

MATH Linear Algebra

MAT1302F Mathematical Methods II Lecture 19

Lecture Summaries for Linear Algebra M51A

Linear Independence Reading: Lay 1.7

Transcription:

AN APPLICATION OF LINEAR ALGEBRA TO NETWORKS K. N. RAGHAVAN 1. Statement of the problem Imagine that between two nodes there is a network of electrical connections, as for example in the following picture between nodes numbered 6 and 1: Imagine further that between nodes 6 and 1 a voltage difference is forced, so that there is a current flowing from 6 to 1. Let us say that a current i 0 is flowing into node 6 and flowing out of node 1 as indicated by the arrows. Let us suppose that we are given information about the resistance of every edge. The problem to be solved is: How does the current i 0 distribute itself over the network? In other words, how to determine the current in each of the edges of the network (as a fraction of i 0 )? There is no loss of generality in assuming that the network contains no loops (that is, edges that start and end at the same node); that there is at most one edge between any two given nodes (multiple edges can be replaced by a single edge of appropriate resistance); and that the network is connected (if the source node, 6 in the picture above, is not connected to the sink node, 1 in the picture above, then of course no current can flow; nodes and edges that are not connected to the source and sink can safely be removed because no current flows in those edges). We orient the edges (that is, put arrows on them) in an arbitrary fashion. Each edge has a node as head and another as tail. For example, 2 is the head and 3 the tail of the edge C in the above picture. Note that the orientation of an edge is without prejudice to the positive direction of actual These are notes of a lecture given at Vellore Institute of Technology, Chennai, on 16th April 2015. They are an alternative exposition of the material in 8.2 of the book Introduction to Linear Algebra (South Asian Edition) by Gilbert Strang. 1

current flow: if it turns out that we chose the other direction, the algebraic value of the current in that edge will come out negative. 2. Comments on the solution We will solve the above problem using linear algebraic notions, or if you prefer matrix analysis. We will set up a linear system of equations (see (6)) which we will show is solvable. Moreover, although (6) admits multiple solutions, all of them lead to the same values of currents in the edges. See the theorem in 6 and the remarks around it. While we will illustrate the steps of the solution in the specific example of the network pictured above, the solution itself is general and applies to any problem of the above nature. It will take us on an excursion through several basic linear algebraic concepts. As we shall see, linear algebra is a good language in which to express the physics involved. 3. The adjacency matrix M We begin by encoding into a matrix M, called the adjacency matrix, information about the network, excluding for the moment the information about the resistances of the edges. Let V denote the set of nodes or vertices of the network; let E denote the set of edges of the network. In the example pictured above, V = {1, 2, 3, 4, 5, 6} and E = {A, B, C, D, E, F, G, H, I}. Let V and E denote respectively the cardinalities of V and E. The adjacency matrix M is of size E V : its rows are indexed by E, its columns by V. If e is an edge and v a vertex, we will denote by M(e, v) the entry in row e and column v of M. Each row of M has exactly two non-zero entries: if e be the edge indexing a row, M(e, head(e)) = 1 and M(e, tail(e)) = 1. The matrix M of the example pictured above is: 1 1 0 0 0 0 1 0 1 0 0 0 0 1 1 0 0 0 0 1 0 1 0 0 0 1 0 0 1 0 (1) 0 0 1 0 1 0 0 0 0 1 1 0 0 0 0 1 0 1 0 0 0 0 1 1 The rows correspond respectively to the edges A, B, C,..., H, I; the columns respectively to the nodes 1,..., 6. Let us the pose the following questions about M: What is the rank of M? What is its kernel? Its range? Convention. In the sequel we will come across matrices with rows (or columns) indexed by V or E. It is understood that the elements of V and E are enumerated once and for all in an arbitrary order. This order remains fixed throughout. 4. The rank of the adjacency matrix M To find the rank of M, we may of course try to row reduce M. Exploiting the special nature of M namely that it is the adjacency matrix of a network leads us quickly to the answer. Let us denote the rows of M by ρ A, ρ B, etc. Observe that ρ A ρ B + ρ C = 0: this is because if we follow 2

the network along the edge A, then along B but in the direction opposite to the arrow, and finally along C, then we would have completed a cycle (starting and ending with 2). So we may remove one of the rows ρ A, ρ B, ρ C from the matrix M and without changing its row space. Let us say we remove ρ B from M and correspondingly the edge B from the network. Proceeding thus, we choose one cycle every time in the remaining network, observe a relation among the rows corresponding to the edges in the cycle, and remove an edge of the cycle from the network and the corresponding row from M. We continue until there are no more cycles left in the network. In the pictured example above, we could proceed as follows: remove B (cycle, A, B, C) remove D (cycle D, E, G) remove F (cycle C, E, F ) remove I (cycle G, H, I) The removed rows ρ B, ρ D, ρ F, and ρ I being linear combinations of the rows that remain, the modified M has the same row space as M. We claim that the remaining rows, namely ρ A, ρ C, ρ E, ρ G, and ρ H are linearly independent. This can be seen as follows. Suppose that there is a linear dependence relation c A ρ A + c C ρ C + c E ρ E + c G ρ G + c H ρ H = 0. Then, because ρ H is the only row (among the five remaining rows) with a non-zero entry in column 6, it follows that c H = 0. Of the other four rows rows (namely ρ A, ρ C, ρ E, ρ G ), since ρ G is the only row with a non-zero entry in column 4, it follows that c G = 0. Of the remaining three rows (namely ρ A, ρ C, ρ E ), since ρ E is the only one with a non-entry in column 5, it follows that c E = 0. Since ρ C has a non-entry in column 3 but ρ A does not, it follows that c C = 0. And finally c A = 0 since ρ A 0. And the claim is proved. We have just proved that the rank of the adjacency matrix M of the network pictured above is 5. The method of proof works in general and gives: The adjacency matrix has rank V 1. (2) Indeed, V 1 is the number of edges that remain in the network at the point when there are no cycles left. And the rows corresponding to these edges are linearly independent. 5. The kernel and range of the adjacency matrix M We think of M as being a linear transformation from R V to R E. Elements of R V are naturally thought of as voltage values at the nodes (recall that X Y denotes functions from Y to X). We may also think of R V as consisting of real column matrices of size V 1. The image under M of an element v of R V is given by usual matrix multiplication: v Mv. Observe that Mv is a column matrix of size E 1 and therefore naturally denotes an element of R E. More abstractly (but also more intrinsically), if an element v of R V is interpreted as a real valued function on V, its image under M is the real valued function on E that maps each edge e to the voltage difference between its tail and head, namely, v(tail(e)) v(head(e)). It is clear from the above description that if v is a constant function (in other words, if as a V 1 column matrix, the entries of v are all equal), then its image under M is zero. On the other hand, since the rank of M is V 1, it follows from the rank-nullity theorem that the kernel of M has dimension 1. Thus: The kernel of M consists of constant functions on V. (3) 3

As to the range of M, which is a subspace of R E, its dimension equals V 1 (see (2)). We think of elements of R E as real valued functions on E. Suppose that ɛ 1 e 1,..., ɛ k e k is a cycle in the network. This means the following: Each ɛ i has value either 1 or 1. Each e i is an edge in the network. Let us say that to travel along ɛ i e i means to travel along the edge e i, in the same direction as its arrow if ɛ i = 1, and in the opposite direction of its arrow if ɛ i = 1. Then traveling along successively along ɛ 1 e 1,..., ɛ k e k completes a cycle in the network. For example, A, -B, -F, E is a cycle in the network pictured above. We may think of a cycle ɛ 1 e 1,..., ɛ k e k as a functional on R E, just by letting f in R E be mapped to ɛ 1 f(e 1 ) + + ɛ k e k. We leave it to the reader as an exercise to prove the following assertions: The subspace spanned by the cycles in the dual space of R E has dimension E V + 1. (In fact, any sequence of cycles chosen as in the procedure above for determining the rank of M would be a basis for the subspace spanned by the cycles.) An element f of R E belongs to the range of M if and only if, for every cycle ɛ 1 e 1,..., ɛ k e k in the network, we have ɛ 1 f(e 1 ) + + ɛ k f(e k ) = 0. 6. Ohm s law As seen in 4, we may think of the adjacency matrix M as a linear transformation from R V to R E. Indeed if v is an element of R V, then Mv, thought of as a function on R E, has value v(tail(e)) v(head(e)) at edge e. If we think of v as giving the voltages at the nodes, then Mv evaluated at an edge e is just the voltage difference between its end points. Thus letting c e denote the conductance of edge e recall that conductance is the reciprocal of resistance we obtain, by Ohm s law, c e (Mv)(e) = i e, where i e denotes the current in edge e. We may combine these expressions of Ohm s law for every edge into a single matrix equation: CMv = i (4) where C is a E E diagonal matrix, whose rows and columns are both indexed by elements of E and whose diagonal entry corresponding to an edge e is the conductance c e of that edge; and i is the column matrix of size E 1 whose entry corresponding to an edge e is the value of the current i e in that edge (along the direction of the arrow). 7. The transpose of M and Kirchoff s current law The transpose M t of M is a V E matrix, with rows indexed by V and columns by E. Thus it is naturally interpreted as a linear transformation from R E to R V. If we denote by i an element of R E and think of it as giving the values of the currents in the edges, then M t i has a nice physical interpretation, which we now want to work out. The entries along a given row of M t are either 0, 1, or 1. In fact, if the row is indexed by a node v, then entry in a column corresponding to an edge e is 1 if v is the tail of e, 1 if v is the head of e, and 0 otherwise. Thus M t i evaluated at a vertex v gives the value of the current flowing out of it (along the network s edges). This value is of course i 0 at the sink, i 0 at the source, and 0 elsewhere (by Kirchoff s current law). Assuming we have enumerated the nodes in such a way 4

that the first node is the sink and the last is the source, we obtain the matrix equation: i 0 0 M t i =. 0 i 0 (5) 8. The main equation and the main theorem Combining equations (4) and (5) we get i 0 0 M t CMv =. 0 i 0 The matrices M and C represent the data of the connections in the network and the information about resistances of the edges. These are known. Thus we may solve the system (6) of linear equations for v. The answers will be in terms of i 0. Once v is known, it is a simple matter to find the matrix i of currents: we could just plug v into (4) to get i. The questions that confront us now are: Is such a system as (6) always solvable? What if there are multiple solutions? Our physical intuition tells us that there ought to be a unique solution to our original problem stated in 1. How is this captured by (6)? As the following theorem shows, all is well: Theorem. The system (6) always has a solution. Any two solutions differ by a column matrix all of whose entries are equal. Thus while v itself admits multiple solutions, the voltage value at a given vertex by itself has no physical significance. It is only the differences in the voltages across edges which matter. And these are uniquely determined. Thus (6) is in agreement with our physical intuition. 9. Proof of the Theorem We claim that M t CM has the same rank as M. For this, it is enough, by the rank nullity theorem, to show that Ker M = Ker M t CM. The containment is clear. Now suppose that M t CMv = 0. Then, multiplying on the left by v t, we get v t M t CMv = 0 or (Mv) t C(Mv) = 0. Putting x = Mv, we get x t Cx = 0 or e E c ex 2 e. Since c e > 0 for all e and x 2 e 0 for all x e, it follows that this can happen only if x = 0. Thus Mv = 0, which means v Ker M and the claim is proved. By (2) it follows that M t CM has rank V 1. Now let us imagine solving (6) by row reducing the augmented matrix (M t CM b) where b stands for the right hand side in (6). Observe that the sum of the columns of M is zero, which means that the sum of the rows of M t (and therefore also those of M t CM) is zero. Let us replace the last row of (M t CM b) by the sum of all the rows. Then the last row would be zero, since b also has the property that the sum of all its rows is zero. 5 (6)

Let us imagine continuing with our row reduction of (M t CM b). Since the rank of M t CM is V 1, all the rows except the last will be non-zero for the V V matrix on the left. It follows that the system (6) has a solution, which proves the first assertion of the theorem. Any two solutions of the inhomogeneous system (6) differ by a solution of the corresponding homogeneous system M t CM = 0. As proved in the claim above, the kernel of M t CM is the same as that of M. As observed in (3), the kernel of M consists of column matrices all of whose entries are the same, and the second assertion of the theorem is proved. 6