Math 511: Linear Algebra
1.3 Applications of Linear Equations
1.3.1 Partial Fraction Decomposition¶
$$ \require{color} \definecolor{brightblue}{rgb}{.267, .298, .812} \definecolor{darkblue}{rgb}{.08, .18, .28} \definecolor{palepink}{rgb}{1, .73, .8} \definecolor{softmagenta}{rgb}{.99,.34,.86} \def\ihat{\hat{\mmlToken{mi}[mathvariant="bold"]{ı}}} \def\jhat{\hat{\mmlToken{mi}[mathvariant="bold"]{ȷ}}} \def\khat{\hat{\mathrm{k}}} \def\tombstone{\unicode{x220E}} $$
Systems of Linear Equations occur in many applications, including applications that do not appear to be linear. In differential equations one must often integrate complicated integrands such as
$$ \dfrac{x^2 + 4x + 1}{x^3 - x^2 - x + 1} $$
The easiest method of integrating this function utilizes a method called partial fraction decomposition. First one must factor the denominator. The Rational Root Theorem states that any rational root of $x^3-x^2-x+1$ must be a ratio whose numerator is a factor of the leading coefficient $1$, and whose denominator is a factor of the constant term $1$. So all rational roots will be
$$ r = \pm 1 $$
We can try the root $1$ by dividing the polynomial by $x-1$ using synthetic division
$$ \begin{array}{cccccc} 1 & | & 1 & -1 & -1 &\ \ 1 \\ & & &\ \ 1 &\ \ 0 & -1 \\ \hline & & 1 &\ \ 0 & -1 &\ \ 0 \\ \end{array} $$
So
$$ x^3 - x^2 - x + 1 = (x-1)(x^2 - 1) = (x-1)(x-1)(x+1) = (x-1)^2(x+1) $$
This means we can re-write our rational integrand
$$ \begin{align*} \dfrac{x^2 + 4x + 1}{x^3 - x^2 - x + 1} &= \dfrac{A}{x-1} + \dfrac{B}{(x - 1)^2} + \dfrac{C}{x+1} \\ \\ &= \dfrac{A(x-1)(x+1)}{(x-1)^2(x+1)} + \dfrac{B(x+1)}{(x-1)^2(x+1)} + \dfrac{C(x-1)^2}{(x-1)^2(x+1)} \\ \\ &= \dfrac{A(x^2-1) + B(x+1) + C(x^2 - 2x + 1)}{(x-1)^2(x+1)} \end{align*} $$
Ignoring our denominators yields
$$ \begin{align*} x^2 + 4x + 1 &= A(x^2-1) + B(x+1) + C(x^2 - 2x + 1) \\ \\ &= Ax^2 - A + Bx + B + Cx^2 - 2Cx + C \\ \\ &= (A + C)x^2 + (B - 2C)x + (-A + B + C) \end{align*} $$
In order for these two quadratic polynomials to be equal we must have
$$ \begin{align*} A \ \ \ \ \ \ \ \ \ \ +\ \ C &= 1 \\ \ \ \ \ \ B - 2C &= 4 \\ -A\ + \ B +\ \ C &= 1 \end{align*} $$
This is a linear system. In order to solve this linear system, or complete this integration we perform Gaussian Elimination.
$$ \begin{align*} \begin{bmatrix}\ \ 1\ &\ \ 0\ &\ \ 1\ & | &\ \ 1\ \\ \ \ 0\ &\ \ 1\ & -2\ & | &\ \ 4\ \\ -1\ &\ \ 1\ &\ \ 1\ & | &\ \ 1\ \end{bmatrix}\begin{array}{l} \\ \\ R_3+R_1 \end{array} &\rightarrow\begin{bmatrix}\ \ 1\ &\ \ 0\ &\ \ 1\ & | &\ \ 1\ \\ \ \ 0\ &\ \ 1\ & -2\ & | &\ \ 4\ \\ \ 0\ &\ \ 1\ &\ \ 2\ & | &\ \ 2\ \end{bmatrix}\begin{array}{l} \\ \\ R_3-R_2 \end{array} \\ \\ \begin{bmatrix}\ \ 1\ &\ \ 0\ &\ \ 1\ & | &\ \ 1\ \\ \ \ 0\ &\ \ 1\ & -2\ & | &\ \ 4\ \\ \ 0\ &\ \ 0\ &\ \ 4\ & | & -2\ \end{bmatrix}\begin{array}{l} \\ \\ \frac{1}{4}R_3 \end{array} &\rightarrow\begin{bmatrix}\ \ 1\ &\ \ 0\ &\ \ 1\ & | &\ \ 1\ \\ \ \ 0\ &\ \ 1\ & -2\ & | &\ \ 4\ \\ \ 0\ &\ \ 0\ &\ \ 1\ & | & -\frac{1}{2}\ \end{bmatrix}\begin{array}{l} R_1-R_2 \\ R_2+2R_3 \\ \\ \end{array} \\ \\ \begin{bmatrix}\ \ 1\ &\ \ 0\ &\ \ 0\ & | &\ \ \frac{3}{2}\ \\ \ \ 0\ &\ \ 1\ &\ \ 0\ & | &\ \ 3\ \\ \ 0\ &\ \ 0\ &\ \ 1\ & | & -\frac{1}{2}\ \end{bmatrix} \end{align*} $$
Thus
$$ \dfrac{x^2 + 4x + 1}{x^3 - x^2 - x + 1} = \dfrac{\frac{3}{2}}{x-1} + \dfrac{3}{(x - 1)^2} - \dfrac{\frac{1}{2}}{x+1} $$
Each of these terms is easier to integrate. We find that the solution to our first order differential equation is given by
$$ \begin{align*} f(x) &= \displaystyle\int \dfrac{x^2 + 4x + 1}{x^3 - x^2 - x + 1}\,dx \\ \\ &= \displaystyle\int \left(\dfrac{\frac{3}{2}}{x-1} + \dfrac{3}{(x - 1)^2} - \dfrac{\frac{1}{2}}{x+1}\right)\,dx \\ \\ &= \frac{3}{2}\displaystyle\int \dfrac{1}{x-1}\,dx + 3\displaystyle\int \dfrac{1}{(x - 1)^2}\,dx - \frac{1}{2}\displaystyle\int \dfrac{1}{x+1}\,dx \\ \\ &= \frac{3}{2}\ln\left|x-1\right| - 3(x-1)^{-1} - \frac{1}{2}\ln\left|x+1\right| + C \\ \\ &= \frac{1}{2}\ln\left(\dfrac{|x-1|^3}{|x+1|}\right) - \dfrac{3}{x-1} + C \end{align*} $$
on the interval $(-1,1)$.
We did not explain differential equations in this example. That is for another course. We also did not explain why this family of solutions solve a differential equation. However notice that a problem that appears to be very nonlinear is still solved using a system of linear equations. We will continue to make computing the coefficients $A$, $B$, and $C$ easier in chapters 2 and 3.
1.3.2 Polynomial Curve Fitting¶
In many applications one is presented with large sets of data and one must obtain useful relationships that allow one to predict future trends. The following table shows U.S. Census data fore previous decades:
Year | 1970 | 1980 | 1990 | 2000 |
---|---|---|---|---|
Population | 205 | 227 | 249 | 282 |
Find a cubic polynomial that fits the data and use it to estimate the population in 2010¶
A cubic polynomial is nonlinear and has the form
$$ p(t) = at^3 + bt^2 + ct + d $$
We must determine the four unknowns from the data. If these four point lie on our cubic polynomial, we set 1970 to be time $t=0$, and subsequent times are in decades since 1970 then,
$$ \begin{align*} p(0) &= 0^3a + 0^2b + 0c + d = 205 \\ p(1) &= 1^3a + 1^2b + 1c + d = 227 \\ p(2) &= 2^3a + 2^2b + 2c + d = 249 \\ p(3) &= 3^3a + 3^2b + 3c + d = 282 \end{align*} $$
This gives us a system of linear equations
$$ \begin{align*} \ \ \ \ \ \ \ \ \ d &= 205 \\ \ \ a +\ \ b +\ \ c + d &= 227 \\ 8a + 4b + 2c + d &= 249 \\ 27a + 9b + 3c + d &= 282 \end{align*} $$
We can re-arrange these equations to obtain an equivalent linear system of equations,
$$ \begin{align*} \begin{bmatrix}\ \ 1\ &\ \ 1\ &\ \ 1\ &\ \ 1\ & | &\ 227\ \\ \ \ 8\ &\ \ 4\ &\ \ 2\ &\ \ 1\ & | &\ 249\ \\ \ \,27\ &\ \ 9\ &\ \ 3\ &\ \ 1\ & | &\ 282\ \\ \ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 1\ & | &\ 205\ \end{bmatrix}\begin{array}{l} R_1-R_4 \\ R_2-R_4 \\ R_3-R_4 \\ \\ \end{array} &\rightarrow\begin{bmatrix}\ \ 1\ &\ \ 1\ &\ \ 1\ &\ \ 0\ & | &\ \, 22\ \\ \ \ 8\ &\ \ 4\ &\ \ 2\ &\ \ 0\ & | &\ \, 44\ \\ \ \, 27\ &\ \ 9\ &\ \ 3\ &\ \ 0\ & | &\ \, 77\ \\ \ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 1\ & | &\ 205\ \end{bmatrix}\begin{array}{l} \\ \frac{1}{2}R_2 \\ \frac{1}{3}R_3 \\ \\ \end{array} \\ \\ \rightarrow\begin{bmatrix}\ \ 1\ &\ \ 1\ &\ \ 1\ &\ \ 0\ & | &\ \, 22\ \\ \ \ 4\ &\ \ 2\ &\ \ 1\ &\ \ 0\ & | &\ \, 22\ \\ \ \, 9\ &\ \ 3\ &\ \ 1\ &\ \ 0\ & | &\ \, \frac{77}{3}\ \\ \ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 1\ & | &\ 205\ \end{bmatrix}\begin{array}{l} \\ R_2-4R_1 \\ R_3-9R_1 \\ \\ \end{array} &\rightarrow\begin{bmatrix}\ \ 1\ &\ \ 1\ &\ \ 1\ &\ \ 0\ & | &\ \, 22\ \\ \ \ 0\ & -2\ & -3\ &\ \ 0\ & | & -66\ \\ \ \ 0\ & -6\ & -8\ &\ \ 0\ & | &\ \, \frac{-517}{3}\ \\ \ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 1\ & | &\ 205\ \end{bmatrix}\begin{array}{l} \\ \\ R_3-3R_2 \\ \\ \end{array} \\ \\ \rightarrow\begin{bmatrix}\ \ 1\ &\ \ 1\ &\ \ 1\ &\ \ 0\ & | &\ \, 22\ \\ \ \ 0\ & -2\ & -3\ &\ \ 0\ & | & -66\ \\ \ \ 0\ &\ \ 0\ &\ \ 1\ &\ \ 0\ & | &\ \, \frac{77}{3}\ \\ \ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 1\ & | &\ 205\ \end{bmatrix}\begin{array}{l} R_1-R_3 \\ R_2+3R_3 \\ \\ \\ \end{array} &\rightarrow\begin{bmatrix}\ \ 1\ &\ \ 1\ &\ \ 0\ &\ \ 0\ & | & -\frac{11}{3}\ \\ \ \ 0\ & -2\ &\ \ 0\ &\ \ 0\ & | &\ \, 11\ \\ \ \ 0\ &\ \ 0\ &\ \ 1\ &\ \ 0\ & | &\ \, \frac{77}{3}\ \\ \ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 1\ & | &\ 205\ \end{bmatrix}\begin{array}{l} \\ -\frac{1}{2}R_2 \\ \\ \\ \end{array} \\ \\ \rightarrow\begin{bmatrix}\ \ 1\ &\ \ 1\ &\ \ 0\ &\ \ 0\ & | & -\frac{11}{3}\ \\ \ \ 0\ &\ \ 1\ &\ \ 0\ &\ \ 0\ & | & -\frac{11}{2}\ \\ \ \ 0\ &\ \ 0\ &\ \ 1\ &\ \ 0\ & | &\ \, \frac{77}{3}\ \\ \ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 1\ & | &\ 205\ \end{bmatrix}\begin{array}{l} R_1-R_2 \\ \\ \\ \\ \end{array} &\rightarrow\begin{bmatrix}\ \ 1\ &\ \ 0\ &\ \ 0\ &\ \ 0\ & | &\ \, \frac{11}{6}\ \\ \ \ 0\ &\ \ 1\ &\ \ 0\ &\ \ 0\ & | & -\frac{11}{2}\ \\ \ \ 0\ &\ \ 0\ &\ \ 1\ &\ \ 0\ & | &\ \, \frac{77}{3}\ \\ \ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 1\ & | &\ 205\ \end{bmatrix} \end{align*} $$
$$ \begin{align*} a &= \frac{11}{6} \\ b &= -\frac{11}{2} \\ c &= \frac{77}{3} \\ d &= 205 \end{align*} $$
The actual population in 2010 was 309 million. It seems our cubic polynomial fit was not very accurate. The cubic polynomial fit of
$$ \frac{11}{6}x^3 - \frac{11}{2}x^2 + \frac{77}{3}x + 205 $$
is accurate for our data, but can not be used to predict future populations.
Data Science¶
As a Data Scientist we study linear algebra for a variety of reasons:
We would like to develop methods to solve the polynomial fit problem accurately but more efficiently than we have here.
We would like to use a method that may be translated into a computer language so that our computing devices can quickly compute our polynomials for us.
We would like to understand these linear systems so that we can analyze much larger sets of data and obtain accurate solutions for higher degree polynomials.
We would like to understand how to find the BEST functional fit for our data; it is not necessarily a polynomial!
We would like to understand these linear systems so that we can more efficiently compute the BEST possible fit for our data without simply trying dozens of different functions until we find one that looks best.
Exercises¶
Exercise 1¶
Systems of Linear Equations
Determine the values of $k$ such that the system of linear equations is inconsistent.
$$
\begin{align*}
kx +\ \ y &= 0 \\
x + ky &= 1
\end{align*}
$$
View Solution
We can re-write the order of the equations
$$ \begin{align*} x + ky &= 1 \\ kx +\ \ y &= 0 \end{align*} $$
Case 1: $k=0$
If $k=0$, then we have $x=1$ and $y=0$ and the linear system of equations is consistent because it has a solution.
Now if $k\neq 0$,
$$ \begin{align*} \begin{bmatrix}\ \ 1\ &\ \ k\ & | &\ \ 1\ \\ \ \ k\ &\ \ 1\ & | &\ \ 0\ \end{bmatrix}\begin{array}{l} \\ R_2-kR_1 \end{array} &\rightarrow\begin{bmatrix}\ \ 1\ &\ \ k\ & | &\ \ 1\ \\ \ \ 0\ & 1-k^2 & | & -k\ \end{bmatrix} \end{align*} $$
Case 2: $(1-k^2)\neq 0$
$$ \begin{align*} \begin{bmatrix}\ \ 1\ &\ \ k\ & | &\ \ 1\ \\ \ \ 0\ & 1-k^2 & | & -k\ \end{bmatrix}\begin{array}{l} \\ \frac{1}{1-k^2}R_2 \end{array} &\rightarrow\begin{bmatrix}\ \ 1\ &\ \ k\ & | &\ \ 1\ \\ \ \ 0\ &\ \ 1\ & | & -\frac{k}{1-k^2}\ \end{bmatrix}\begin{array}{l} R_1-kR_2 \\ \\ \end{array} \\ \\ &\rightarrow\begin{bmatrix}\ \ 1\ &\ \ 0\ & | &\ \frac{1}{1-k^2}\ \\ \ \ 0\ &\ \ 1\ & | & -\frac{k}{1-k^2}\ \end{bmatrix} \end{align*} $$
or
$$ \begin{align*} x &=\ \ \frac{1}{1-k^2} \\ y &= -\frac{k}{1-k^2} \end{align*} $$
Thus we have a solution $x=\frac{1}{1-k^2}$ and $y=-\frac{k}{1-k^2}$ so the system of linear equations is still consistent.
Case 3: $(1-k^2) = 0$
However, if $1-k^2=0$, then $k=\pm 1$ we have
$$ \begin{bmatrix}\ \ 1\ & \pm 1\ & | &\ \ 1\ \\ \pm 1\ &\ \ 1\ & | &\ \ 0\ \end{bmatrix} $$
Each of these linear systems is inconsistent.
$$ \begin{align*} \begin{bmatrix}\ \ 1\ &\ \ 1\ & | &\ \ 1\ \\ \ \ 1\ &\ \ 1\ & | &\ \ 0\ \end{bmatrix}\begin{array}{l} \\ R_2-R_1 \end{array} &\rightarrow\begin{bmatrix}\ \ 1\ &\ \ 1\ & | &\ \ 1\ \\ \ \ 0\ &\ \ 0\ & | & -1\ \end{bmatrix} \end{align*} $$
$$ \begin{align*} \begin{bmatrix}\ \ 1\ & -1\ & | &\ \ 1\ \\ -1\ &\ \ 1\ & | &\ \ 0\ \end{bmatrix}\begin{array}{l} \\ R_2+R_1 \end{array} &\rightarrow\begin{bmatrix}\ \ 1\ &\ \ 1\ & | &\ \ 1\ \\ \ \ 0\ &\ \ 0\ & | &\ \ 1\ \end{bmatrix} \end{align*} $$
Exercise 2¶
Transition Probabilities Matrices
Assume that the children of 80 percent of Harvard graduates also attend Harvard and the rest attend to Yale. Consider also that 40 percent of the children of Yale graduates attend Yale, and the rest split evenly between Harvard and Dartmouth; and of the children of Dartmouth graduates, 70 percent attend Dartmouth, 20 percent attend Harvard, and 10 percent attend Yale.
Draw the directed graph illustrating the change of state probability from one generation of graduates to the next for each University.
Create the Transition Probabilities Matrix $P$ for this directed graph.
The transition probabilities matrix for the grandchildren of University graduates will be $P^2$. Compute $P^2$.
What is the probability that the grandchild of a Harvard graduate attends Harvard?
View Solution
1. You must create a directed graph with a circle for each University or state of the linear system. The directed arrows are labeled with the probablity that next next generation will transition from their father's state to another.
Notice that the sum of the probabilities of the out arrows for each state (or node) equals $100\%$. This indicates that the children of the graduates of these Universities all attend one of them. If some chose not to attend college, we would need a no university state for these children.
2. We can create a table with the transition probabilites for each state. The columns represent the nodes of the directed graph. In other words, the alma mater of one's parent. Each element of the column contains the transition probability from the parent University to the child's.
Parent/Child | Harvard | Dartmouth | Yale |
---|---|---|---|
Harvard | .8 | .2 | .3 |
Dartmouth | 0 | .7 | .3 |
Yale | .2 | .1 | .4 |
We can create the transition probabilities matrix from either the graph or the table
$$ P = \begin{bmatrix} .8 & .2 & .3 \\ 0 & .7 & .3 \\ .2 & .1 & .4 \end{bmatrix} $$
3. $P^2 = \begin{bmatrix} .8 & .2 & .3 \\ 0 & .7 & .3 \\ .2 & .1 & .4 \end{bmatrix}\,\begin{bmatrix} .8 & .2 & .3 \\ 0 & .7 & .3 \\ .2 & .1 & .4 \end{bmatrix} = \begin{bmatrix} .70 & .33 & .42 \\ .06 & .52 & .33 \\ .24 & .15 & .25 \end{bmatrix}$
Notice that the sum of each column is still $100\%$ so $P^2$ is also a transition probabilities matrix. It contains the transition probabilites of for each generation's state after two steps.
4. The transition probability for the grandchild of a Harvard graduate is $70\%$ since $p_{11}$ is the transition probability of a transition from Harvard to Harvard after two generations (steps).
Exercise 3¶
Network Analysis
Consider the following network. Assume that the flow into each node into the network is equal to the flow out of each network, FLOW IN = FLOW OUT.
View Solution
From the directed graph we have
$$ \begin{align*} x_1 + 10 &= 20 \\ x_2 + 10 &= 20 \\ x_3 &= x_2 + 20 \\ x_3 &= x_4 + 10 \\ x_4 &= x_1 + 10 \end{align*} $$
From this system of linear equations we can simplify.
$$ \begin{align*} x_1\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ &= 10 \\ x_2\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ &= 10 \\ - x_2 + x_3\ \ \ \ \ \ \ \ \ &= 20 \\ x_3 - x_4 &= 10 \\ -x_1\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ + x_4 &= 10 \\ \\ \begin{bmatrix}\ \ 1\ &\ \ 0\ &\ \ 0\ &\ \ 0\ & | & \ 10\ \\ \ \ 0\ &\ \ 1\ &\ \ 0\ &\ \ 0\ \ & | & \ 10\ \\ \ \ 0\ & -1\ &\ \ 1\ &\ \ 0\ \ & | & \ 20\ \\ \ \ 0\ &\ \ 0\ &\ \ 1\ & -1\ \ & | & \ 10\ \\ -1\ &\ \ 0\ &\ \ 0\ &\ \ 1 \ & | & \ 10\ \end{bmatrix}\begin{array}{l} \\ \\ R_3+R_2 \\ \\ R_5+R_1 \end{array} &\rightarrow\begin{bmatrix}\ \ 1\ &\ \ 0\ &\ \ 0\ &\ \ 0\ & | & \ 10\ \\ \ \ 0\ &\ \ 1\ &\ \ 0\ &\ \ 0\ \ & | & \ 10\ \\ \ \ 0\ &\ \ 0\ &\ \ 1\ &\ \ 0\ \ & | & \ 30\ \\ \ \ 0\ &\ \ 0\ &\ \ 1\ & -1\ \ & | & \ 10\ \\ \ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 1 \ & | & \ 20\ \end{bmatrix}\begin{array}{l} \\ \\ \\ R_4-R_2 \\ \\ \end{array} \\ \\ \rightarrow\begin{bmatrix}\ \ 1\ &\ \ 0\ &\ \ 0\ &\ \ 0\ & | & \ 10\ \\ \ \ 0\ &\ \ 1\ &\ \ 0\ &\ \ 0\ \ & | & \ 10\ \\ \ \ 0\ &\ \ 0\ &\ \ 1\ &\ \ 0\ \ & | & \ 30\ \\ \ \ 0\ &\ \ 0\ &\ \ 0\ & -1\ \ & | & -20\ \\ \ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 1 \ & | & \ 20\ \end{bmatrix}\begin{array}{l} \\ \\ \\ -R_4 \\ R_5+R_4 \end{array} &\rightarrow\begin{bmatrix}\ \ 1\ &\ \ 0\ &\ \ 0\ &\ \ 0\ & | & \ 10\ \\ \ \ 0\ &\ \ 1\ &\ \ 0\ &\ \ 0\ \ & | & \ 10\ \\ \ \ 0\ &\ \ 0\ &\ \ 1\ &\ \ 0\ \ & | & \ 30\ \\ \ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 1\ \ & | &\ 20\ \\ \ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 0 \ & | & \ \ 0\ \end{bmatrix} \end{align*} $$
This yields the solution to the flow problem. $\mathbf{x}=\begin{bmatrix}\ 10\ \\ \ 10\ \\ \ 30\ \\ \ 20\ \end{bmatrix}$.
Exercise 4¶
Circuit Analysis
Consider the circuit. Kirkoff's Circuit Laws are two equations that we can use to compute the current or voltage in an electrical circuit
Kirkoff's Laws¶
- The algebraic sum of currents in a network of conductors meeting at a point is zero.
- The directed sum of the potential differences (voltages) around any closed loop is zero.
Determine the currents $I_1$, $I_2$, $I_3$, $I_4$, $I_5$, and $I_6$ in the circuit in figure 4.
View Solution
Appling Kirchoff's first law to the four junctions yields
$$ \begin{align*} \text{Node }1. &\ &I_1+I_3 &= I_2 \\ \text{Node }2. &\ &I_2 &= I_1 + I_4 \\ \text{Node }3. &\ &I_5 &= I_3 + I_6 \\ \text{Node }4. &\ &I_4 + I_6 &= I_5 \end{align*} $$
Applying Kirchoff's second law to the three paths results in
$$ \begin{align*} \text{Loop }1. &\ &3I_1 + 2I_2 &= 14 \\ \text{Loop }2. &\ &2I_2 + 4I_3 + 2I_4 + I_5 &= 25 \\ \text{Loop }3. &\ &I_5 + I_6 &= 8 \end{align*} $$
This is an overdetermined linear system
$$ \begin{align*} \begin{bmatrix}\ \ 1\ & -1\ &\ \ 1\ &\ \ 0\ &\ \ 0\ &\ \ 0\ & | &\ \ 0\ \\ \ \ 1\ & -1\ &\ \ 0\ &\ \ 1\ &\ \ 0\ &\ \ 0\ & | &\ \ 0\ \\ \ \ 0\ &\ \ 0\ &\ \ 1\ &\ \ 0\ & -1\ &\ \ 1\ & | &\ \ 0\ \\ \ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 1\ & -1\ &\ \ 1\ & | & \ \ 0\ \\ \ \ 3\ &\ \ 2\ &\ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 0\ & | &\ \,14\ \\ \ \ 0\ &\ \ 2\ &\ \ 4\ &\ \ 2\ &\ \ 1\ &\ \ 0\ & | &\ \,25\ \\ \ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 1\ &\ \ 1\ & | &\ \ 8\ \end{bmatrix}\begin{array}{l} \\ R_2-R_1 \\ \\ \\ R_5-3R_1 \\ \\ \\ \end{array} &\rightarrow\begin{bmatrix}\ \ 1\ & -1\ &\ \ 1\ &\ \ 0\ &\ \ 0\ &\ \ 0\ & | &\ \ 0\ \\ \ \ 0\ &\ \ 0\ & -1\ &\ \ 1\ &\ \ 0\ &\ \ 0\ & | &\ \ 0\ \\ \ \ 0\ &\ \ 0\ &\ \ 1\ &\ \ 0\ & -1\ &\ \ 1\ & | &\ \ 0\ \\ \ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 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\ 0\ & | &\ \ 2\ \\ \ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 1\ &\ \ 0\ &\ \ 0\ & | &\ \ 2\ \\ \ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 1\ &\ \ 0\ & | &\ \ 5\ \\ \ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 1\ & | &\ \ 3\ \\ \ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 0\ & | &\ \ 0\ \end{bmatrix}\begin{array}{l} R_1+R_2 \\ \\ \\ \\ \\ \\ \\ \end{array} \\ \\ \rightarrow\begin{bmatrix}\ \ 1\ &\ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 0\ & | &\ \ 2\ \\ \ \ 0\ &\ \ 1\ &\ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 0\ & | &\ \ 4\ \\ \ \ 0\ &\ \ 0\ &\ \ 1\ &\ \ 0\ &\ \ 0\ &\ \ 0\ & | &\ \ 2\ \\ \ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 1\ &\ \ 0\ &\ \ 0\ & | &\ \ 2\ \\ \ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 1\ &\ \ 0\ & | &\ \ 5\ \\ \ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 1\ & | &\ \ 3\ \\ \ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 0\ &\ \ 0\ & | &\ \ 0\ \end{bmatrix} \end{align*} $$
Hence our unique solution for the currents across each resistor are
$$ I_1 = 2\,\text{\textbf{A}},\ I_2 = 4\,\text{\textbf{A}},\ I_3 = 2\,\text{\textbf{A}},\ I_4 = 2\,\text{\textbf{A}},\ I_5 = 5\,\text{\textbf{A}},\ I_6 = 3\,\text{\textbf{A}} $$
Your use of this self-initiated mediated course material is subject to our Creative Commons License 4.0