← Back to Fundamentals of Electric Circuits Overview
\nx 1 = Δ 1 Δ x 2 = Δ 2 Δ ⋮ x n = Δ n Δ \n \begin{aligned}\nx_1 &= \frac{\Delta_1}{\Delta} \\
x_2 &= \frac{\Delta_2}{\Delta} \\
&\vdots \\
x_n &= \frac{\Delta_n}{\Delta}\n\end{aligned} \nx 1 x 2 x n = Δ Δ 1 = Δ Δ 2 ⋮ = Δ Δ n \n
\n(A.5)
where the ∆‘s are the determinants given by
Δ = ∣ a 11 a 12 ⋯ a 1 n a 21 a 22 ⋯ a 2 n ⋮ ⋮ ⋯ ⋮ a n 1 a n 2 ⋯ a n n ∣ , Δ 1 = ∣ b 1 a 12 ⋯ a 1 n b 2 a 22 ⋯ a 2 n ⋮ ⋮ ⋯ ⋮ b n a n 2 ⋯ a n n ∣ \Delta = \begin{vmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \cdots & \vdots \\ a_{n1} & a_{n2} & \cdots & a_{nn} \end{vmatrix}, \qquad \Delta_1 = \begin{vmatrix} b_1 & a_{12} & \cdots & a_{1n} \\ b_2 & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \cdots & \vdots \\ b_n & a_{n2} & \cdots & a_{nn} \end{vmatrix} Δ = a 11 a 21 ⋮ a n 1 a 12 a 22 ⋮ a n 2 ⋯ ⋯ ⋯ ⋯ a 1 n a 2 n ⋮ a nn , Δ 1 = b 1 b 2 ⋮ b n a 12 a 22 ⋮ a n 2 ⋯ ⋯ ⋯ ⋯ a 1 n a 2 n ⋮ a nn
Δ 2 = ∣ a 11 b 1 ⋯ a 1 n a 21 b 2 ⋯ a 2 n ⋮ ⋮ ⋯ ⋮ a n 1 b n ⋯ a n n ∣ , … , Δ n = ∣ a 11 a 12 ⋯ b 1 a 21 a 22 ⋯ b 2 ⋮ ⋮ ⋯ ⋮ a n 1 a n 2 ⋯ b n ∣ \Delta_2 = \begin{vmatrix} a_{11} & b_1 & \cdots & a_{1n} \\ a_{21} & b_2 & \cdots & a_{2n} \\ \vdots & \vdots & \cdots & \vdots \\ a_{n1} & b_n & \cdots & a_{nn} \end{vmatrix}, \dots, \Delta_n = \begin{vmatrix} a_{11} & a_{12} & \cdots & b_1 \\ a_{21} & a_{22} & \cdots & b_2 \\ \vdots & \vdots & \cdots & \vdots \\ a_{n1} & a_{n2} & \cdots & b_n \end{vmatrix} Δ 2 = a 11 a 21 ⋮ a n 1 b 1 b 2 ⋮ b n ⋯ ⋯ ⋯ ⋯ a 1 n a 2 n ⋮ a nn , … , Δ n = a 11 a 21 ⋮ a n 1 a 12 a 22 ⋮ a n 2 ⋯ ⋯ ⋯ ⋯ b 1 b 2 ⋮ b n
( A .6 ) (A.6) ( A .6 )
Notice that ∆ is the determinant of matrix A and ∆ k is the determinant of the matrix formed by replacing the k th column of A by B . It is evi dent from Eq. (A.5) that Cramer’s rule applies only when ∆ ≠ 0. When ∆ = 0, the set of equations has no unique solution, because the equations are linearly dependent.
The value of the determinant ∆, for example, can be obtained by expanding along the first row:
Δ = ∣ a 11 a 12 a 13 ⋯ a 1 n a 21 a 22 a 23 ⋯ a 2 n a 31 a 32 a 33 ⋯ a 3 n ⋮ ⋮ ⋮ ⋯ ⋮ a n 1 a n 2 a n 3 ⋯ a n n ∣ \Delta = \begin{vmatrix} a_{11} & a_{12} & a_{13} & \cdots & a_{1n} \\ a_{21} & a_{22} & a_{23} & \cdots & a_{2n} \\ a_{31} & a_{32} & a_{33} & \cdots & a_{3n} \\ \vdots & \vdots & \vdots & \cdots & \vdots \\ a_{n1} & a_{n2} & a_{n3} & \cdots & a_{nn} \end{vmatrix} Δ = a 11 a 21 a 31 ⋮ a n 1 a 12 a 22 a 32 ⋮ a n 2 a 13 a 23 a 33 ⋮ a n 3 ⋯ ⋯ ⋯ ⋯ ⋯ a 1 n a 2 n a 3 n ⋮ a nn
= a 11 M 11 − a 12 M 12 + a 13 M 13 + ⋯ + ( − 1 ) 1 + n a 1 n M 1 n a_{11}M_{11} - a_{12}M_{12} + a_{13}M_{13} + \cdots + (-1)^{1+n}a_{1n}M_{1n} a 11 M 11 − a 12 M 12 + a 13 M 13 + ⋯ + ( − 1 ) 1 + n a 1 n M 1 n (A.7)
where the minor Mij is an ( n − 1) × ( n − 1) determinant of the matrix formed by striking out the i th row and j th column. The value of ∆ may also be obtained by expanding along the first column:
Δ = a 11 M 11 − a 21 M 21 + a 31 M 31 + ⋯ + ( − 1 ) n + 1 a n 1 M n 1 \Delta = a_{11}M_{11} - a_{21}M_{21} + a_{31}M_{31} + \dots + (-1)^{n+1}a_{n1}M_{n1} Δ = a 11 M 11 − a 21 M 21 + a 31 M 31 + ⋯ + ( − 1 ) n + 1 a n 1 M n 1
(A.8)
We now specifically develop the formulas for calculating the deter minants of 2 × 2 and 3 × 3 matrices, because of their frequent occurrence in this text. For a 2 × 2 matrix,
Δ = ∣ a 11 a 12 a 21 a 22 ∣ = a 11 a 22 − a 12 a 21 \Delta = \begin{vmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{vmatrix} = a_{11}a_{22} - a_{12}a_{21} Δ = a 11 a 21 a 12 a 22 = a 11 a 22 − a 12 a 21
(A.9)
1 n 1 n
For a 3 × 3 matrix,
Δ = ∣ a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33 ∣ = a 11 ( − 1 ) 2 ∣ a 22 a 23 a 32 a 33 ∣ + a 21 ( − 1 ) 3 ∣ a 12 a 13 a 32 a 33 ∣ \Delta = \begin{vmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{vmatrix} = a_{11}(-1)^2 \begin{vmatrix} a_{22} & a_{23} \\ a_{32} & a_{33} \end{vmatrix} + a_{21}(-1)^3 \begin{vmatrix} a_{12} & a_{13} \\ a_{32} & a_{33} \end{vmatrix} Δ = a 11 a 21 a 31 a 12 a 22 a 32 a 13 a 23 a 33 = a 11 ( − 1 ) 2 a 22 a 32 a 23 a 33 + a 21 ( − 1 ) 3 a 12 a 32 a 13 a 33
a 31 ( − 1 ) 4 ∣ a 12 a 13 a 22 a 23 ∣ a_{31}(-1)^4 \begin{vmatrix} a_{12} & a_{13} \\ a_{22} & a_{23} \end{vmatrix} a 31 ( − 1 ) 4 a 12 a 22 a 13 a 23
= a 11 ( a 22 a 33 − a 32 a 23 ) − a 21 ( a 12 a 33 − a 32 a 13 ) a_{11}(a_{22}a_{33} - a_{32}a_{23}) - a_{21}(a_{12}a_{33} - a_{32}a_{13}) a 11 ( a 22 a 33 − a 32 a 23 ) − a 21 ( a 12 a 33 − a 32 a 13 )
a 31 ( a 12 a 23 − a 22 a 13 ) a_{31}(a_{12}a_{23} - a_{22}a_{13}) a 31 ( a 12 a 23 − a 22 a 13 ) (A.10)
An alternative method of obtaining the determinant of a 3 × 3 matrix is by repeating the first two rows and multiplying the terms diagonally as follows.
= a 11 a 22 a 33 + a 21 a 32 a 13 + a 31 a 12 a 23 − a 13 a 22 a 31 − a 23 a 32 a 11 = a_{11}a_{22}a_{33} + a_{21}a_{32}a_{13} + a_{31}a_{12}a_{23} - a_{13}a_{22}a_{31} - a_{23}a_{32}a_{11} = a 11 a 22 a 33 + a 21 a 32 a 13 + a 31 a 12 a 23 − a 13 a 22 a 31 − a 23 a 32 a 11
-a33 a12 a21 (A.11)
In summary:
The solution of linear simultaneous equations by Cramer’s rule boils down to finding
x k = Δ k Δ , k = 1 , 2 , … , n (A.12) x_k = \frac{\Delta_k}{\Delta}, \qquad k = 1, 2, \dots, n \tag{A.12} x k = Δ Δ k , k = 1 , 2 , … , n ( A.12 )
where ∆ is the determinant of matrix A and ∆k is the determinant of the matrix formed by replacing the kth column of A by B.
You may not find much need to use Cramer’s method described in this appendix, in view of the availability of calculators, computers, and software packages such as MATLAB , which can be used easily to solve a set of linear equations. But in case you need to solve the equations by hand, the material covered in this appendix becomes useful. At any rate, it is important to know the mathematical basis of those calculators and software packages.
Example A.1 Solve the simultaneous equations
4 x 1 − 3 x 2 = 17 , − 3 x 1 + 5 x 2 = − 21 4x_1 - 3x_2 = 17, \qquad -3x_1 + 5x_2 = -21 4 x 1 − 3 x 2 = 17 , − 3 x 1 + 5 x 2 = − 21
Solution:
The given set of equations is cast in matrix form as
[ 4 − 3 − 3 5 ] [ x 1 x 2 ] = [ 17 − 21 ] \begin{bmatrix} 4 & -3 \ -3 & 5 \end{bmatrix} \begin{bmatrix} x_1 \ x_2 \end{bmatrix} = \begin{bmatrix} 17 \ -21 \end{bmatrix} [ 4 − 3 − 3 5 ] [ x 1 x 2 ] = [ 17 − 21 ]
The determinants are evaluated as
Δ = ∣ 4 − 3 − 3 5 ∣ = 4 × 5 − ( − 3 ) ( − 3 ) = 11 \Delta = \begin{vmatrix} 4 & -3 \\ -3 & 5 \end{vmatrix} = 4 \times 5 - (-3)(-3) = 11 Δ = 4 − 3 − 3 5 = 4 × 5 − ( − 3 ) ( − 3 ) = 11
\n
Δ 1 = ∣ 17 − 3 − 21 5 ∣ = 17 × 5 − ( − 3 ) ( − 21 ) = 22 \Delta_1 = \begin{vmatrix} 17 & -3 \\ -21 & 5 \end{vmatrix} = 17 \times 5 - (-3)(-21) = 22 Δ 1 = 17 − 21 − 3 5 = 17 × 5 − ( − 3 ) ( − 21 ) = 22
\n
Δ 2 = ∣ 4 17 − 3 − 21 ∣ = 4 × ( − 21 ) − 17 × ( − 3 ) = − 33 \Delta_2 = \begin{vmatrix} 4 & 17 \\ -3 & -21 \end{vmatrix} = 4 \times (-21) - 17 \times (-3) = -33 Δ 2 = 4 − 3 17 − 21 = 4 × ( − 21 ) − 17 × ( − 3 ) = − 33
One may use other methods, such as matrix inversion and elimination. Only Cramer’s method is covered here, because of its simplicity and also because of the availability of powerful calculators.
Hence,
x 1 = Δ 1 Δ = 22 11 = 2 x_1 = \frac{\Delta_1}{\Delta} = \frac{22}{11} = 2 x 1 = Δ Δ 1 = 11 22 = 2
, x 2 = Δ 2 Δ = − 33 11 = − 3 x_2 = \frac{\Delta_2}{\Delta} = \frac{-33}{11} = -3 x 2 = Δ Δ 2 = 11 − 33 = − 3
Find the solution to the following simultaneous equations:
3x 1 − x 2 = 4, −6x 1 + 18x 2 = 16
Answer: x 1 = 1.833, x 2 = 1.5.
Determine x 1, x 2, and x 3 for this set of simultaneous equations:
25 x 1 − 5 x 2 − 20 x 3 = 50 25x1 - 5x2 - 20x3 = 50 25 x 1 − 5 x 2 − 20 x 3 = 50
− 5 x 1 + 10 x 2 − 4 x 3 = 0 -5x1 + 10x2 - 4x3 = 0 − 5 x 1 + 10 x 2 − 4 x 3 = 0
− 5 x 1 − 4 x 2 + 9 x 3 = 0 -5x1 - 4x2 + 9x3 = 0 − 5 x 1 − 4 x 2 + 9 x 3 = 0
Solution:
In matrix form, the given set of equations becomes
25 −5 −20 x1 50 −5 10 −4 x2 = 0 [ −5 −4 ] 9 [ ] x3 [ ] 0
We apply Eq. (A.11) to find the determinants. This requires that we repeat the first two rows of the matrix. Thus,
\Delta = \begin{vmatrix} 25 & -5 & -20 \\ -5 & 10 & -4 \\ -5 & -4 & 9 \end{vmatrix} = \begin{vmatrix} 25 & -5 & -20 \\ -5 & 10 & -4 \\ -5 & -5 & 10 \end{vmatrix} + \begin{vmatrix} 25 & -5 & -20 \\ -5 & 10 & -4 \\ -5 & 10 & -4 \end{vmatrix} + \begin{vmatrix} 25 & -5 & -20 \\ -5 & 10 & -4 \\ -5 & 10 & -4 \end{vmatrix} + \begin{vmatrix} 25 & -5 & -20 \\ -5 & 10 & -4 \\ -5 & 10 & -4 \end{vmatrix} + \begin{vmatrix} 25 & -5 & -20 \\ -5 & 10 & -4 \\ -5 & 10 & -4 \end{vmatrix} + \begin{vmatrix} 25 & -5 & -20 \\ -5 & 10 & -4 \\ -5 & 10 & -4 \end{vmatrix} + \begin{vmatrix} 25 & -5 & -20 \\ -5 & 10 & -4 \\ -5 & 10 & -4 \end{vmatrix} + \begin{vmatrix} 25 & -5 & -20 \\ -5 & 10 & -4 \\ -5 & 10 & -4 \end{vmatrix} + \begin{vmatrix} 25 & -5 & -20 \\ -5 & 10 & -4 \\ -5 & 10 & -4 \end{vmatrix} + \begin{vmatrix} 25 & -5 & -20 \\ -5 & 10 & -4 \\ -5 & 10 & -4 \end{vmatrix} + \begin{vmatrix} 25 & -5 & -20 \\ -5 & 10 & -4 \\ -5 & 10 & -4 \end{vmatrix} + \begin{vmatrix} 25 & -5 & -20 \\ -5 & 10 & -4 \\ -5 & 10 & -4 \end{vmatrix} + \begin{vmatrix} 25 & -5 & -20 \\ -5 & 10 & -4 \\ -5 & 10 & -4 \end{vmatrix} + \begin{vmatrix} 25 & -5 & -20 \\ -5 & 10 & -4 \\ -5 & 10 & -4 \end{vmatrix} + \begin{vmatrix} 25 & -5 & -20 \\ -5 & 10 & -4 \\ -5 & 10 & -4 \end{vmatrix} + \begin{vmatrix} 25 & -5 & -20 \\ -5 & 10 & -4 \\ -5 & 10 & -4 \end{vmatrix} + \begin{vmatrix} 25 & -5 & -20 \\ -5 & 10 & -4 \\
Similarly,
Δ 1 = ∣ 50 − 5 − 20 0 10 − 4 0 − 4 9 ∣ = ∣ 50 − 5 − 20 0 10 − 4 50 50 5 0 10 − 4 ∣ + ∣ 50 − 5 − 20 0 4 4 + 0 10 ∣ \Delta_1 = \begin{vmatrix} 50 & -5 & -20 \\ 0 & 10 & -4 \\ 0 & -4 & 9 \end{vmatrix} = \begin{vmatrix} 50 & -5 & -20 \\ 0 & 10 & -4 \\ 50 & 50 & 5 \\ 0 & 10 & -4 \end{vmatrix} + \begin{vmatrix} 50 & -5 & -20 \\ 0 & 4 & 4 \\ + & 0 & 10 \end{vmatrix} Δ 1 = 50 0 0 − 5 10 − 4 − 20 − 4 9 = 50 0 50 0 − 5 10 50 10 − 20 − 4 5 − 4 + 50 0 + − 5 4 0 − 20 4 10
Practice Problem A.1
Example A.2
= 0 + 0 + 1000 − 0 − 0 + 2250 = 3250 = 0 + 0 + 1000 - 0 - 0 + 2250 = 3250 = 0 + 0 + 1000 − 0 − 0 + 2250 = 3250
= 0 + 1000 + 0 + 2500 − 0 − 0 = 3500
Hence, we now find
x 1 = Δ 1 Δ = 3700 125 = 29.6 x_1 = \frac{\Delta_1}{\Delta} = \frac{3700}{125} = 29.6 x 1 = Δ Δ 1 = 125 3700 = 29.6
x 2 = Δ 2 Δ = 3250 125 = 26 x_2 = \frac{\Delta_2}{\Delta} = \frac{3250}{125} = 26 x 2 = Δ Δ 2 = 125 3250 = 26
x 3 = Δ 2 Δ = 3500 125 = 28 x_3 = \frac{\Delta_2}{\Delta} = \frac{3500}{125} = 28 x 3 = Δ Δ 2 = 125 3500 = 28
Obtain the solution of this set of simultaneous equations: Practice Problem A.2
3x 1 − x 2 − 2x 3 = 1 −x 1 + 6x 2 − 3x 3 = 0 −2x 1 − 3x 2 + 6x 3 = 6
Answer: x 1 = 3 = x 3, x 2 = 2.
A.2 Matrix Inversion
The linear system of equations in Eq. (A.3) can be solved by matrix inversion. In the matrix equation AX = B , we may invert A to get X , i.e.,
X = A − 1 B (A.13) \mathbf{X} = \mathbf{A}^{-1} \mathbf{B} \tag{A.13} X = A − 1 B ( A.13 )
where A − 1 is the inverse of A . Matrix inversion is needed in other applications apart from using it to solve a set of equations.
By definition, the inverse of matrix A satisfies
A − 1 A = A A − 1 = I \mathbf{A}^{-1}\mathbf{A} = \mathbf{A}\mathbf{A}^{-1} = \mathbf{I} A − 1 A = A A − 1 = I
(A.14)
where I is an identity matrix. A − 1 is given by
A − 1 = adj A det A A^{-1} = \frac{\text{adj } A}{\text{det } A} A − 1 = det A adj A
(A.15)
where adj A is the adjoint of A and det A = |A | is the determinant of A . The adjoint of A is the transpose of the cofactors of A . Suppose we are given an n × n matrix A as
A = [ a 11 a 12 ⋯ a 1 n a 21 a 22 ⋯ a 2 n ⋮ ⋮ ⋱ ⋮ a n 1 a n 2 ⋯ a n n ] \mathbf{A} = \begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{n1} & a_{n2} & \cdots & a_{nn} \end{bmatrix} A = a 11 a 21 ⋮ a n 1 a 12 a 22 ⋮ a n 2 ⋯ ⋯ ⋱ ⋯ a 1 n a 2 n ⋮ a nn
(A.16)
The cofactors of A are defined as
C = cof ( A ) = [ c 11 c 12 ⋯ c 1 n c 21 c 22 ⋯ c 2 n ⋮ c n 1 c n 2 ⋯ c n n ] \mathbf{C} = \text{cof}(\mathbf{A}) = \begin{bmatrix} c_{11} & c_{12} & \cdots & c_{1n} \\ c_{21} & c_{22} & \cdots & c_{2n} \\ \vdots & & & \\ c_{n1} & c_{n2} & \cdots & c_{nn} \end{bmatrix} C = cof ( A ) = c 11 c 21 ⋮ c n 1 c 12 c 22 c n 2 ⋯ ⋯ ⋯ c 1 n c 2 n c nn
(A.17)
where the cofactor cij is the product of ( −1)i +j and the determinant of the (n − 1) × (n − 1) submatrix is obtained by deleting the i th row and j th column from A . For example, by deleting the first row and the first column of A in Eq. (A.16), we obtain the cofactor c 11 as
c 11 = ( − 1 ) 2 ∣ a 22 a 23 ⋯ a 2 n a 32 a 33 ⋯ a 3 n ⋮ a n 2 a n 3 ⋯ a n n ∣ c_{11} = (-1)^2 \begin{vmatrix} a_{22} & a_{23} & \cdots & a_{2n} \\ a_{32} & a_{33} & \cdots & a_{3n} \\ \vdots & & & \\ a_{n2} & a_{n3} & \cdots & a_{nn} \end{vmatrix} c 11 = ( − 1 ) 2 a 22 a 32 ⋮ a n 2 a 23 a 33 a n 3 ⋯ ⋯ ⋯ a 2 n a 3 n a nn
(A.18)
Once the cofactors are found, the adjoint of A is obtained as
a d j ( A ) = [ c 11 c 12 ⋯ c 1 n c 21 c 22 ⋯ c 2 n ⋮ c n 1 c n 2 ⋯ c n n ] T = C T adj (A) = \begin{bmatrix} c_{11} & c_{12} & \cdots & c_{1n} \\ c_{21} & c_{22} & \cdots & c_{2n} \\ \vdots & & & \\ c_{n1} & c_{n2} & \cdots & c_{nn} \end{bmatrix}^T = C^T a d j ( A ) = c 11 c 21 ⋮ c n 1 c 12 c 22 c n 2 ⋯ ⋯ ⋯ c 1 n c 2 n c nn T = C T
(A.19)
where T denotes transpose.
In addition to using the cofactors to find the adjoint of A , they are also used in finding the determinant of A which is given by
∣ A ∣ = ∑ j = 1 n a i j c i j |\mathbf{A}| = \sum_{j=1}^{n} a_{ij} c_{ij} ∣ A ∣ = j = 1 ∑ n a ij c ij
(A.20)
where i is any value from 1 to n . By substituting Eqs. (A.19) and (A.20) into Eq. (A.15), we obtain the inverse of A as
A − 1 = C T ∣ A ∣ (A.21) \mathbf{A}^{-1} = \frac{\mathbf{C}^T}{|\mathbf{A}|} \tag{A.21} A − 1 = ∣ A ∣ C T ( A.21 )
For a 2 × 2 matrix, if
A = [ a b c d ] (A.22) \mathbf{A} = \begin{bmatrix} a & b \\ c & d \end{bmatrix} \tag{A.22} A = [ a c b d ] ( A.22 )
its inverse is
A − 1 = 1 ∣ A ∣ [ d − b − c a ] = 1 a d − b c [ d − b − c a ] \mathbf{A}^{-1} = \frac{1}{|\mathbf{A}|} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} = \frac{1}{ad - bc} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} A − 1 = ∣ A ∣ 1 [ d − c − b a ] = a d − b c 1 [ d − c − b a ]
(A.23)
For a 3 × 3 matrix, if
A = [ a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33 ] \mathbf{A} = \begin{bmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{bmatrix} A = a 11 a 21 a 31 a 12 a 22 a 32 a 13 a 23 a 33
(A.24)
we first obtain the cofactors as
C = [ c 11 c 12 c 13 c 21 c 22 c 23 c 31 c 32 c 33 ] \mathbf{C} = \begin{bmatrix} c_{11} & c_{12} & c_{13} \\ c_{21} & c_{22} & c_{23} \\ c_{31} & c_{32} & c_{33} \end{bmatrix} C = c 11 c 21 c 31 c 12 c 22 c 32 c 13 c 23 c 33
(A.25)
where
c 11 = ∣ a 22 a 23 a 32 a 33 ∣ , \t c 12 = − ∣ a 21 a 23 a 31 a 33 ∣ , \t c 13 = ∣ a 21 a 22 a 31 a 32 ∣ , c_{11} = \begin{vmatrix} a_{22} & a_{23} \\ a_{32} & a_{33} \end{vmatrix}, \t c_{12} = -\begin{vmatrix} a_{21} & a_{23} \\ a_{31} & a_{33} \end{vmatrix}, \t c_{13} = \begin{vmatrix} a_{21} & a_{22} \\ a_{31} & a_{32} \end{vmatrix}, c 11 = a 22 a 32 a 23 a 33 , \t c 12 = − a 21 a 31 a 23 a 33 , \t c 13 = a 21 a 31 a 22 a 32 ,
\n
c 21 = − ∣ a 12 a 13 a 32 a 33 ∣ , \t c 22 = ∣ a 11 a 13 a 31 a 33 ∣ , \t c 23 = − ∣ a 11 a 12 a 31 a 32 ∣ , c_{21} = -\begin{vmatrix} a_{12} & a_{13} \\ a_{32} & a_{33} \end{vmatrix}, \t c_{22} = \begin{vmatrix} a_{11} & a_{13} \\ a_{31} & a_{33} \end{vmatrix}, \t c_{23} = -\begin{vmatrix} a_{11} & a_{12} \\ a_{31} & a_{32} \end{vmatrix}, c 21 = − a 12 a 32 a 13 a 33 , \t c 22 = a 11 a 31 a 13 a 33 , \t c 23 = − a 11 a 31 a 12 a 32 ,
\n
c 31 = ∣ a 12 a 13 a 22 a 23 ∣ , \t c 32 = − ∣ a 11 a 13 a 21 a 23 ∣ , \t c 33 = ∣ a 11 a 12 a 21 a 22 ∣ c_{31} = \begin{vmatrix} a_{12} & a_{13} \\ a_{22} & a_{23} \end{vmatrix}, \t c_{32} = -\begin{vmatrix} a_{11} & a_{13} \\ a_{21} & a_{23} \end{vmatrix}, \t c_{33} = \begin{vmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{vmatrix} c 31 = a 12 a 22 a 13 a 23 , \t c 32 = − a 11 a 21 a 13 a 23 , \t c 33 = a 11 a 21 a 12 a 22
\n(A.26)
The determinant of the 3 × 3 matrix can be found using Eq. (A.11). Here, we want to use Eq. (A.20), i.e.,
∣ A ∣ = a 11 c 11 + a 12 c 12 + a 13 c 13 |\mathbf{A}| = a_{11}c_{11} + a_{12}c_{12} + a_{13}c_{13} ∣ A ∣ = a 11 c 11 + a 12 c 12 + a 13 c 13
(A.27)
The idea can be extended n > 3, but we deal mainly with 2 × 2 and 3 × 3 matrices in this book.
Example A.3 Use matrix inversion to solve the simultaneous equations
2x 1 + 10x 2 = 2, −x 1 + 3x 2 = 7
Solution:
We first express the two equations in matrix form as
[ 2 10 − 1 3 ] [ x 1 x 2 ] = [ 2 7 ] \begin{bmatrix} 2 & 10 \ -1 & 3 \end{bmatrix} \begin{bmatrix} x_1 \ x_2 \end{bmatrix} = \begin{bmatrix} 2 \ 7 \end{bmatrix} [ 2 10 − 1 3 ] [ x 1 x 2 ] = [ 2 7 ]
or
A X = B ⟶ X = A − 1 B AX = B \longrightarrow X = A^{-1}B A X = B ⟶ X = A − 1 B
where
A = [ 2 10 − 1 3 ] , X = [ x 1 x 2 ] , B = [ 2 7 ] \mathbf{A} = \begin{bmatrix} 2 & 10 \\ -1 & 3 \end{bmatrix}, \qquad \mathbf{X} = \begin{bmatrix} x_1 \\ x_2 \end{bmatrix}, \qquad \mathbf{B} = \begin{bmatrix} 2 \\ 7 \end{bmatrix} A = [ 2 − 1 10 3 ] , X = [ x 1 x 2 ] , B = [ 2 7 ]
The determinant of A is |A | = 2 × 3 − 10(−1) = 16, so the inverse of A is
A − 1 = 1 16 [ 3 − 10 1 2 ] \mathbf{A}^{-1} = \frac{1}{16} \begin{bmatrix} 3 & -10 \\ 1 & 2 \end{bmatrix} A − 1 = 16 1 [ 3 1 − 10 2 ]
Hence,
X = A − 1 B = 1 16 [ 3 − 10 1 2 ] [ 2 7 ] = 1 16 [ − 64 16 ] = [ − 4 1 ] \mathbf{X} = \mathbf{A}^{-1} \mathbf{B} = \frac{1}{16} \begin{bmatrix} 3 & -10 \\ 1 & 2 \end{bmatrix} \begin{bmatrix} 2 \\ 7 \end{bmatrix} = \frac{1}{16} \begin{bmatrix} -64 \\ 16 \end{bmatrix} = \begin{bmatrix} -4 \\ 1 \end{bmatrix} X = A − 1 B = 16 1 [ 3 1 − 10 2 ] [ 2 7 ] = 16 1 [ − 64 16 ] = [ − 4 1 ]
i.e., x 1 = −4 and x 2 = 1.
Solve the following two equations by matrix inversion. Practice Problem A.3
2 y 1 − y 2 = 4 , y 1 + 3 y 2 = 9 2y_1 - y_2 = 4, \quad y_1 + 3y_2 = 9 2 y 1 − y 2 = 4 , y 1 + 3 y 2 = 9
Answer: y 1 = 3, y 2 = 2.
Determine x 1, x 2, and x 3 for the following simultaneous equations using Example A.4 matrix inversion.
x 1 + x 2 + x 3 = 5 x_1 + x_2 + x_3 = 5 x 1 + x 2 + x 3 = 5
-x1 + 2x2 = 9
4 x 1 + x 2 − x 3 = − 2 4x_1 + x_2 - x_3 = -2 4 x 1 + x 2 − x 3 = − 2
Solution:
In matrix form, the equations become
[ 1 1 1 − 1 2 0 4 1 − 1 ] [ x 1 x 2 x 3 ] = [ 5 9 − 2 ] \begin{bmatrix} 1 & 1 & 1 \ -1 & 2 & 0 \ 4 & 1 & -1 \ \end{bmatrix} \begin{bmatrix} x_1 \ x_2 \ x_3 \end{bmatrix} = \begin{bmatrix} 5 \ 9 \ -2 \end{bmatrix} [ 1 1 1 − 1 2 0 4 1 − 1 ] [ x 1 x 2 x 3 ] = [ 5 9 − 2 ]
or
A X = B ⟶ X = A − 1 B AX = B \longrightarrow X = A^{-1}B A X = B ⟶ X = A − 1 B
where
A = [ 1 1 1 − 1 2 0 4 1 − 1 ] , X = [ x 1 x 2 x 3 ] , B = [ 5 9 − 2 ] \mathbf{A} = \begin{bmatrix} 1 & 1 & 1 \\ -1 & 2 & 0 \\ 4 & 1 & -1 \end{bmatrix}, \quad \mathbf{X} = \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix}, \quad \mathbf{B} = \begin{bmatrix} 5 \\ 9 \\ -2 \end{bmatrix} A = 1 − 1 4 1 2 1 1 0 − 1 , X = x 1 x 2 x 3 , B = 5 9 − 2
We now find the cofactors
c 11 = ∣ 2 0 1 − 1 ∣ = − 2 , c 12 = − ∣ − 1 0 4 − 1 ∣ = − 1 , c 13 = ∣ − 1 2 4 1 ∣ = − 9 c_{11} = \begin{vmatrix} 2 & 0 \\ 1 & -1 \end{vmatrix} = -2, \quad c_{12} = -\begin{vmatrix} -1 & 0 \\ 4 & -1 \end{vmatrix} = -1, \quad c_{13} = \begin{vmatrix} -1 & 2 \\ 4 & 1 \end{vmatrix} = -9 c 11 = 2 1 0 − 1 = − 2 , c 12 = − − 1 4 0 − 1 = − 1 , c 13 = − 1 4 2 1 = − 9
c 21 = − ∣ 1 1 1 − 1 ∣ = 2 , c 22 = ∣ 1 1 4 − 1 ∣ = − 5 , c 23 = − ∣ 1 1 4 1 ∣ = 3 c_{21} = -\begin{vmatrix} 1 & 1 \\ 1 & -1 \end{vmatrix} = 2, \quad c_{22} = \begin{vmatrix} 1 & 1 \\ 4 & -1 \end{vmatrix} = -5, \quad c_{23} = -\begin{vmatrix} 1 & 1 \\ 4 & 1 \end{vmatrix} = 3 c 21 = − 1 1 1 − 1 = 2 , c 22 = 1 4 1 − 1 = − 5 , c 23 = − 1 4 1 1 = 3
c 31 = ∣ 1 1 2 0 ∣ = − 2 , c 32 = − ∣ 1 1 − 1 0 ∣ = − 1 , c 33 = ∣ 1 1 − 1 2 ∣ = 3 c_{31} = \begin{vmatrix} 1 & 1 \\ 2 & 0 \end{vmatrix} = -2, \quad c_{32} = -\begin{vmatrix} 1 & 1 \\ -1 & 0 \end{vmatrix} = -1, \quad c_{33} = \begin{vmatrix} 1 & 1 \\ -1 & 2 \end{vmatrix} = 3 c 31 = 1 2 1 0 = − 2 , c 32 = − 1 − 1 1 0 = − 1 , c 33 = 1 − 1 1 2 = 3
The adjoint of matrix A is
a d j A = [ − 2 − 1 − 9 2 − 5 3 − 2 − 1 3 ] T = [ − 2 2 − 2 − 1 − 5 − 1 − 9 3 3 ] adj \mathbf{A} = \begin{bmatrix} -2 & -1 & -9 \\ 2 & -5 & 3 \\ -2 & -1 & 3 \end{bmatrix}^T = \begin{bmatrix} -2 & 2 & -2 \\ -1 & -5 & -1 \\ -9 & 3 & 3 \end{bmatrix} a d j A = − 2 2 − 2 − 1 − 5 − 1 − 9 3 3 T = − 2 − 1 − 9 2 − 5 3 − 2 − 1 3
We can find the determinant of A using any row or column of A . Because one element of the second row is 0, we can take advantage of this to find the determinant as
∣ A ∣ = − 1 c 21 + 2 c 22 + ( 0 ) c 23 = − 1 ( 2 ) + 2 ( − 5 ) = − 12 |\mathbf{A}| = -1c_{21} + 2c_{22} + (0)c_{23} = -1(2) + 2(-5) = -12 ∣ A ∣ = − 1 c 21 + 2 c 22 + ( 0 ) c 23 = − 1 ( 2 ) + 2 ( − 5 ) = − 12
Hence, the inverse of A is
A − 1 = 1 − 12 [ − 2 2 − 2 − 1 − 5 − 1 − 9 3 3 ] \mathbf{A}^{-1} = \frac{1}{-12} \begin{bmatrix} -2 & 2 & -2 \\ -1 & -5 & -1 \\ -9 & 3 & 3 \end{bmatrix} A − 1 = − 12 1 − 2 − 1 − 9 2 − 5 3 − 2 − 1 3
X = A − 1 B = 1 − 12 [ − 2 2 − 2 − 1 − 5 − 1 − 9 3 3 ] [ 5 9 − 2 ] = [ − 1 4 2 ] \mathbf{X} = \mathbf{A}^{-1} \mathbf{B} = \frac{1}{-12} \begin{bmatrix} -2 & 2 & -2 \\ -1 & -5 & -1 \\ -9 & 3 & 3 \end{bmatrix} \begin{bmatrix} 5 \\ 9 \\ -2 \end{bmatrix} = \begin{bmatrix} -1 \\ 4 \\ 2 \end{bmatrix} X = A − 1 B = − 12 1 − 2 − 1 − 9 2 − 5 3 − 2 − 1 3 5 9 − 2 = − 1 4 2
i.e.,
x 1 = − 1 x_1 = -1 x 1 = − 1
, x 2 = 4 x_2 = 4 x 2 = 4 , x 3 = 2 x_3 = 2 x 3 = 2 .
Practice Problem A.4 Solve the following equations using matrix inversion.
y 1 − y 3 = 1 y_1 - y_3 = 1 y 1 − y 3 = 1
2y1 + 3y2 - y3 = 1
y 1 − y 2 − y 3 = 3 y_1 - y_2 - y_3 = 3 y 1 − y 2 − y 3 = 3
Answer: y 1 = 6*, y*2 *= −*2, y 3 = 5.
Appendix B
Complex Numbers
The ability to manipulate complex numbers is very handy in circuit analysis and in electrical engineering in general. Complex numbers are particularly useful in the analysis of ac circuits. Again, although calculators and computer software packages are now available to manipulate complex numbers, it is still advisable for a student to be familiar with how to handle them by hand.
B.1 Representations of Complex Numbers
A complex number z may be written in rectangular form as
z = x + j y (B.1) z = x + jy \tag{B.1} z = x + j y ( B.1 )
where j = √ ___ −1 ; x is the real part of z while y is the imaginary part of z ; that is,
x = Re ( z ) , y = Im ( z ) (B.2) x = \text{Re}(z), \qquad y = \text{Im}(z) \tag{B.2} x = Re ( z ) , y = Im ( z ) ( B.2 )
The complex number z is shown plotted in the complex plane in Fig. B.1. Because j = √ ___ −1 ,
1 j = − j \frac{1}{j} = -j j 1 = − j
\n
j 2 = − 1 j^{2} = -1 j 2 = − 1
\n
j 3 = j ⋅ j 2 = − j j^{3} = j \cdot j^{2} = -j j 3 = j ⋅ j 2 = − j
\n
j 4 = j 2 ⋅ j 2 = 1 j^{4} = j^{2} \cdot j^{2} = 1 j 4 = j 2 ⋅ j 2 = 1
\n
j 5 = j ⋅ j 4 = j j^{5} = j \cdot j^{4} = j j 5 = j ⋅ j 4 = j
\n
⋮ \vdots ⋮
\n
n n + 4 = j n n^{n+4} = j^{n} n n + 4 = j n
\n(B.3)
The complex plane looks like the two-dimensional curvilinear coordinate space, but it is not.
A second way of representing the complex number z is by specifying its magnitude r and the angle it makes with the real axis, as Fig. B.1 shows. This is known as the polar form . It is given by
j
z = ∣ z ∣ θ ‾ = r θ ‾ z = |z| \underline{\theta} = r \underline{\theta} z = ∣ z ∣ θ = r θ
(B.4)
where
r = x 2 + y 2 r = \sqrt{x^2 + y^2} r = x 2 + y 2
, θ = tan − 1 y x \theta = \tan^{-1} \frac{y}{x} θ = tan − 1 x y (B.5a)
or
x = r cos θ , y = r sin θ (B.5b) x = r \cos \theta, \qquad y = r \sin \theta \tag{B.5b} x = r cos θ , y = r sin θ ( B.5b )
that is,
z = x + j y = r / θ = r cos θ + j r sin θ z = x + jy = r/\theta = r\cos\theta + jr\sin\theta z = x + j y = r / θ = r cos θ + j r sin θ
(B.6)