Nothing Special   »   [go: up one dir, main page]

2.5 Notes and Examples For Matrix Equations: Example 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

2.

5 Notes and Examples for Matrix Equations


Throughout the previous sections, we introduced matrices and basic operations for adding,
subtracting and multiplication of matrices. We also discussed some techniques how to
evaluate the inverse of a squared matrix if it exists. Remember that these operations are not
defined for all matrices and there are conditions that must be met in order to apply these
operations. For instance, addition and subtraction make only sense if the two matrices have
the same dimension and the product is only defined if the number of columns of the first
matrix is equal to the number of rows of the second. The inverse of a matrix exists only for
squared matrices with nonzero determinants. Further, we saw that the division of a matrix
with another matrix is not defend at all!
In this section we will use these operations to solve equations of matrices where the
unknowns (variables) are matrices rather than numbers as we know them from real numbers
analysis.
For a matrix equation of the form 𝐴. 𝑋 = 𝐵, the variable 𝑋 is a matrix that has a dimension
that allows the product with the matrix 𝐴.
Let us see some examples:
Example 1:
Solve for 𝑋
3 2 6 3
𝑋+[ ]=[ ]
1 0 7 −1
3 2 3 2 6 3 3 2
𝑋+[ ]−[ ]=[ ]−[ ]
1 0 1 0 7 −1 1 0
0 0 6−3 3−2 3 1
𝑋+[ ]=[ ]=[ ]
0 0 7 − 1 −1 − 0 6 −1
𝟑 𝟏
𝑿=[ ]
𝟔 −𝟏
Example 2:
Solve for 𝑋
−9 −3 4 0
𝑋−[ ]=[ ]
6 0 12 −10
−9 −3 −9 −3 4 0 −9 −3
𝑋−[ ]+[ ]=[ ]+[ ]
6 0 6 0 12 −10 6 0
0 0 4 − 9 0 + (−3) −5 −3
𝑋−[ ]=[ ]=[ ]
0 0 12 + 6 −10 + 0 18 −10

−𝟓 −𝟑
𝑿=[ ]
𝟏𝟖 −𝟏𝟎
For solving matrix equations involving multiplication, since there is no division defined for
matrices, we will use the fact that 𝐼 = 𝐴−1 . 𝐴 = 𝐴. 𝐴−1 as shown in the next example:

1
Example 3:
Given the matrices
2 3 3 1
𝐴=[ ] and 𝐵 = [ ]
1 2 2 −5
Solve the equation:
𝐴∙𝑋 =𝐵
Here, we expect 𝑋 to be a matrix with dimension 2 × 2. As you know, for solving such type of
equations involving real numbers, we usually divide by 𝐴 to solve for 𝑋. Since we do not have
division for matrices -as mentioned earlier- we will multiply be inverse of the matrix 𝐴 if it
exists. Remember that 𝐴−1 exists if and only if 𝐴 is a squared matrix with det⁡(𝐴) ≠ 0. The
latest we need to check first.
2 3
det ([ ]) = 2.2 − 1.3 = 4 − 3 = 1 ≠ 0
1 2
For 2 × 2 matrices, the inverse could be evaluated as follows:
𝑎 𝑏 1 𝑑 −𝑏
For 𝐴 = [ ],⁡then⁡𝐴−1 = det⁡(𝐴) [ ], if det⁡(𝐴) ≠ 0
𝑐 𝑑 −𝑐 𝑎
2 3 1 2 −3 2 −3
So the inverse of [ ] is = 1 [ ]=[ ]
1 2 −1 2 −1 2
Now multiply be 𝐴−1:
𝐴∙𝑋 =𝐵
𝐴−1 ∙ 𝐴 ∙ 𝑋 = 𝐴−1 ∙ 𝐵
𝐼 ∙ 𝑋 = 𝐴−1 ∙ 𝐵
𝑋 = 𝐴−1 ∙ 𝐵

We plug in 𝐴−1 ⁡and⁡𝐵 in 𝑋 = 𝐴−1 ∙ 𝐵 to solve the equation:


2 −3 3 1 6−6 2 + 15 0 17
𝑋=[ ]∙[ ]=[ ]=[ ]
−1 2 2 −5 −3 + 4 −1 − 10 1 −11
𝟎 𝟏𝟕
𝑿=[ ]
𝟏 −𝟏𝟏

One more example involving both addition and multiplication:


Example 4:
Given the three matrices
1 1 1 0 0 1
𝐴=[ ], 𝐵 =[ ] and 𝐶 = [ ]
1 2 0 2 1 0
Solve the equation:

2
𝑋∙𝐴+𝐵 =𝐶
We will use the techniques of the previous examples combined to solve this example.
𝑋∙𝐴+𝐵 =𝐶
𝑋∙𝐴+𝐵−𝐵 =𝐶−𝐵
𝑋∙𝐴+𝟎=𝐶−𝐵
𝑋∙𝐴=𝐶−𝐵
Now, multiply both sides of the equation by 𝐴−1 ⁡if it exists to solve for 𝑋 as follows:
𝑋 ∙ 𝐴 ∙ 𝐴−1 = (𝐶 − 𝐵) ∙ 𝐴−1
𝑋 ∙ 𝐼 = (𝐶 − 𝐵) ∙ 𝐴−1
𝑋 = (𝐶 − 𝐵) ∙ 𝐴−1
We check the determinant of⁡det⁡(𝐴) ≠ 0
1 1
det ([ ]) = 2.1 − 1.1 = 2 − 1 = 1 ≠ 0, so the inverse exists. We use the method from
1 2
the previous example to evaluate 𝐴−1
1 2 −1 2 −1
𝐴−1 = [ ]=[ ]
1 −1 1⁡ −1 1⁡
Finally, we substitute to solve for 𝑋 in
𝑋 = (𝐶 − 𝐵) ∙ 𝐴−1
0 1 1 0 2 −1
𝑋 = ([ ]−[ ]) ∙ [ ]
1 0 0 2 −1 1⁡
0−1 1−0 2 −1
𝑋 = ([ ]) ∙ [ ]
1−0 0−2 −1 1⁡
−1 1 2 −1 −3 2
𝑋 = ([ ]) ∙ [ ]=[ ]
1 −2 −1 1⁡ 4 −3⁡
−𝟑 𝟐
𝑿=[ ]
𝟒 −𝟑⁡
Notice that in this example we multiplied the equation on both sides with⁡𝐴−1 from the left
since 𝐴⁡was on the right. This is not the same as multiplying from the right since, in general,
the matrix multiplication is noncommutative!
To wrap-up this section, we will turn to an example involving a 3 × 3 matrix equation:
Example 5:
1 0 0 0 1 1 1 0 0
Given 𝐴 = [1 1 0], ⁡𝐵 = [1 0 0] and 𝐶 = [0 1 0]
1 1 1 0 0 1 1 0 1

Solve the equation:

3
𝐴 ∙ 𝑋 + 2𝐵 = 3𝐶
𝐴 ∙ 𝑋 + 2𝐵 − 2𝐵 = 3𝐶 − 2𝐵
𝐴 ∙ 𝑋 + 𝟎 = 3𝐶 − 2𝐵
𝐴 ∙ 𝑋 = 3𝐶 − 2𝐵
If det⁡(𝐴) ≠ 0, then multiply by 𝐴−1 :
𝐴−1 ∙ 𝐴 ∙ 𝑋 = 𝐴−1 ∙ (3𝐶 − 2𝐵)
𝐼 ∙ 𝑋 = 𝐴−1 ∙ (3𝐶 − 2𝐵)
𝑋 = 𝐴−1 ∙ (3𝐶 − 2𝐵)
So we need to show that If det⁡(𝐴) ≠ 0 and evaluate 𝐴−1 :
1 0 0
1 0 1 0 1 1
det(𝐴) = |1 1 0| = 1 ∙ | |−0∙| |+0∙| |= 1−0+0=1 ≠0
1 1 1 1 1 1
1 1 1
I will leave it for you as an exercise to show that
1 0 0
𝐴−1 = [−1 1 0]
0 −1 1
You may use the Gaussian-elimination method to reduce the augmented matrix ⟨𝐴|𝐼⟩ into
⟨𝐼|𝐴−1 ⟩.
Now plug in the value for 𝐵⁡, 𝐶⁡and⁡𝐴−1 in the simplified equation
𝑋 = 𝐴−1 ∙ (3𝐶 − 2𝐵)
1 0 0 1 0 0 0 1 1
𝑋 = [−1 1 0] ∙ (3 [0 1 0] − 2 [1 0 0])
0 −1 1 1 0 1 0 0 1
1 0 0 3 0 0 0 2 2
𝑋 = [−1 1 0] ∙ ([0 3 0] − [2 0 0])
0 −1 1 3 0 3 0 0 2
1 0 0 3 −2 −2
𝑋 = [−1 1 0] ∙ ([−2 3 0 ])
0 −1 1 3 0 1
𝟑 −𝟐 −𝟐
𝑿 = [−𝟓 𝟓 𝟐]
𝟓 −𝟑 𝟏

You might also like