In Chapter 2, we solved systems by looking for intersections of lines and planes. In Chapter 3, we learned how matrices describe linear transformations. Now we’ll put these ideas together: solving a linear system means finding a vector that a matrix sends to a specified output.
We’ll start with a small electrical network, then develop a method that also works for much larger systems.
An engineer connects a 10-volt supply to a resistor network. There are two junctions with unknown voltages V1 and V2. The ground connection has voltage 0.
The connections are:
From
To
Resistance
10-volt supply
V1
2Ω
V1
Ground
6Ω
V1
V2
3Ω
V2
Ground
3Ω
We need two physical rules. Ohm’s law says that current from voltage V toward voltage W through resistance R is (V−W)/R. A negative value means the current flows in the opposite direction. Current balance says that total current entering a junction equals total current leaving it.
At V1, current arrives from the supply and leaves toward ground and V2:
210−V1=6V1+3V1−V2.
Multiplying by 6 gives 30−3V1=V1+2(V1−V2). Collecting terms and dividing by 2 gives
3V1−V2=15.
At V2, current arriving from V1 leaves toward ground:
3V1−V2=3V2⟹−V1+2V2=0.
Together, these equations give
[3−1−12][V1V2]=[150].
The resistances determine the coefficient matrix. Changing the supply voltage changes the right-hand side. We’ll return to this system in Chapter 4.3.
A solution is one vector whose entries satisfy every equation at the same time. For our circuit,
[3−1−12][63]=[18−3−6+6]=[150],
so V1=6 and V2=3 solve the system.
We can interpret this in three familiar ways:
Equations: the point (6,3) lies on both lines 3x−y=15 and −x+2y=0.
Columns:6[3−1]+3[−12]=[150].
Transformations: the map T(x)=Ax sends [63] to [150].
For a matrix of shape n×d, this transformation has domain Rd and codomain Rn.
If A is invertible, Chapter 3.6 tells us that the unique solution is x=A−1b. But we don’t need to compute the entire inverse to solve a system. Our goal is to find the solution by working with simpler matrices.
A metal bar is divided into three equal segments. Its endpoints are kept at 0∘C and 60∘C, and the interior temperatures are T1 and T2, in that order:
0∘C⟷T1⟷T2⟷60∘C.
No heat escapes through the sides. Assume each segment has thermal conductance 1 watt per degree Celsius, so the heat flow toward the left is the temperature at its right endpoint minus the temperature at its left endpoint, in watts.
The temperatures have stopped changing: at each interior point, heat arriving from the right equals heat leaving to the left. How can we use this balance to write a system for the two unknown temperatures?
At the point with temperature T1, heat arrives from the right at a rate of T2−T1 watts and leaves toward the left at a rate of T1−0 watts. Setting these equal gives
T2−T1=T1−0⟹2T1−T2=0.
At the point with temperature T2, heat arrives from the right endpoint at a rate of 60−T2 watts and leaves toward T1 at a rate of T2−T1 watts. Thus,
Order the unknowns as T1,T2. The coefficients of T1 form the first column, and the coefficients of T2 form the second:
A[2−1−12]T[T1T2]=b[060].
If the right endpoint changes to 90∘C, the coefficient matrix stays the same, while the right-hand side becomes [090]. Just as in the circuit example, changing a boundary value changes b without changing A.
We’ll revisit this system in Chapter 4.3, where we’ll use an LU factorization to find the two temperatures.