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

Calculus for Engineers II - Sample problems on Matrices.

Manuela Kulaxizi

Exercise 1: Find the determinant of the following matrices:

1.
 
0 1 2
1 0 3 
4 −3 8

2.
 
0 1 2 0
1 0 3 9
 
−1 −3 1 2
0 1 −1 −2

3.
 
−1 1 0 0
 0 −3 1 0
 
−3 9 −6 12 
1 −3 2 −4

4.
 
−1 1 4 3 1
 0 −3 1 2 1
 
−3 0 0 1 0
 
 1 −1 2 2 1
3 −2 1 2 4

Exercsie 2: Does the inverse exist for all matrices of Question 1 ?


Exercise 3: Find the inverse, if it exists, of the following matrices:

1.  
1 2 0
M1 = 0 1 0
0 0 3
2.  
1 −2 0 1
0 0 1 −2
M2 = 
−3 2 1 0 

−1 0 1 0

Exercise 4: Solve for the matrix Q if all matrices below are square matrices and have
an inverse:
A−1 B T RQS −1 AT B = RB
Exercise 5: Consider the following matrix:
 
a1 a2 0 0
a3 a4 0 0 
P = 
 b1 b2 d 1 d 2 
b3 b4 d 3 d 4

and denote the corresponding submatrices as


     
a1 a2 b1 b2 d1 d2
A= , B= , D= .
a3 a4 b3 b4 d3 d4

Show that
det (P ) = det (D) det (A)
Exercise 6: Solve the following linear systems of equations by finding the inverse of the
matrix of coefficients:
1.
x + 2y = 3
y=7
3z = 9

2.
x − 2y + w = 5
z − 2w = 10
−3x + 2y + z = 3
−x + z = 7

3.
x + y + 3z = 1
x + 3y + z = 2
x + y + 3z = 3
Exercise 7: Use Cramer’s rule to solve again the linear system of Question 4.3.
Exercise 8: Solve the following systems using the method of your choice:

1.
3x + 2y + 7z = 10
x − y + 3z = 3
6x + 4y + 14z = 2

2.
x − y + 3z = 2
2x − 3y + 9z = 3
−x + y − 3z = −2

Solutions:
Exerscise 1.1: The simplest way to compute this determinant is by expanding around a
row or column which contains as many zeros as possible. Let us expand around the first
row:

0 1 2
1 3 1 0
1 0 3 = −1 + 2 = − (8 − 12) + 2 (−3 − 0) = 4 − 6 = −2

4 8 4 − 3
4 − 3 8

Exercise 1.2: Let us expand around the first column, which contains two zeros.

0 1 2 0
1 2 0 1 2 0
1 0 3 9
= −1 −3 1 2 + (−1) 0 3 9 =

−1 − 3

1 2
1 − 1 −2 1 − 1 −2
0 1 −1 − 2
! !
1 2 −3 2 3 9 0 9
= −1 1 − 2 − 1 1 − 2 =

−1 − 2 1 − 2 −1 − 2 1 − 2
= − ((−2 − (−2)) − 2(6 − 2)) − ((−6 − (−9)) − 2(0 − 9)) = −13

Exercise 1.3: Here we will find the determinant by expanding along the first line.

−1 1 0 0
−3 1 0 0 1 0
0−3 1 0
= −1 9 − 6 12 − 1 −3 − 6 12 =

−3 9 −6 12


−3 2 −4 1 2 −4
1−3 2−4
! !
−6 12 9 12 −3 12
= −1 −3 − 1 − 1 −1 =

2−4 −3 − 4 1−4
= − (−3(24 − 24) − 1(36 − 36)) − (−(12 − 12)) = 0

Exercise 1.4:To find the determinant in this case we will expand along the third row,
since it has the most number of zeros:

−1 1 4 3 1
1 4 3 1 −1 1 4 1
0 − 3 1 2 1

−3 0 0 1 0 = −3 −3 1
2 1 0−3 1 1
− 1 =

−1 2 1−1


1 − 1 2 2 1
2 1 2 1




−2 1 2 4 3−2 1 4
3 − 2 1 2 4
 
1 2 1 −3 2 1 −3 1 1 −3 1 2

= −3 1 2 2 1 − 4 −1 2 1 + 3 −1 2 1 − 1 −1 2 2  +
 

1 2 4 −2 2 4 −2 1 4 −2 1 2
 
−3 1 1 1 4 1 1 4 1

−1 −1 −1 2 1 + 1 −3 1 1 − 3 −3 1 1  =
 

−2 1 4 −2 1 4 −1 2 1
= −3 (−6 − 4(−12) + 3(−16) − 1(−2)) − (−(−16) + 42 − 6) = −40
In the last line we skipped the details of the computation of the ”3 × 3” matrices listed.

Exercise 2: Only the matrices whose determinants are different from zero have an in-
verse. This means that all matrices of Exercise 1 have an inverse except for the matrix
correspondning to E1.3.

Exercise 3.1: The first step in finding the inverse of a matrix, is to compute its deter-
minant. This will also tell us whether the inverse exists or not.

1 2 0
1 0
det (M1 ) = 0 1 0 = 1 = 3 6= 0

0 3
0 0 3

Given that the determinant is different than zero, the inverse matrix exists. To find it,
we must find the matrix of cofactors and take its transpose. Let us here compute the
cofactors:

C11 = 3, C12 = 0, C13 = 0, C21 = −6, C22 = 3, C23 = 0, C31 = 0, C32 = 0, C33 = 1

where we skipped the details of the computations of the relevant determinants since they
are pretty straightforward.
According to the theorem, if C is the matric of cofactors, the inverse is equal to:
 
3 −6 0
1 1
M1−1 = C T = 0 3 0 
det (M1 ) 3
0 0 1

Exercise 3.2: We will follow the same steps as in E3.1. First we compute the determi-
nant of the matrix M2 . We obtain:

det M2 = 2 6= 0,

Since the determinant is differnet from zero, the inverse matrix exists and to find it, we
just need to compute the cofactors. The result is:

C11 = −4, C12 = −4, C13 = −4, C14 = −2, C21 = −2, C22 = −2, C23 = −2, C24 = −2
C31 = −4, C32 = −3, C33 = −4, C34 = −2, C41 = 6, C42 = 5, C43 = 8 C44 = 4 .

Therefore, the inverse matrix is


 
−4 −2 −4 6
1 −4 −2 −3 5
M2−1 =  
2 −4 −2 −4 8
−2 −2 −2 4

Exercise 4: Since all matrices have an inverse we can multiply from the left and from
the right with the appropriate inverse matrices to solve for Q:

Q = R−1 (B T )−1 ARBB −1 (AT )−1 S = R−1 (B T )−1 AR(AT )−1 S ,

where we used the associativity property of the product and the fact that BB −1 = B −1 B =
1, with 1 the unit matrix.

Exercise 5: Let us compute the determinant of matrix P by expanding along the first
row:

a1 a2 0 0
a4 0 0 a3 0 0 ! !
a a 0 0 d d2 d d2
3 4 1 1
= a1 b 2 d1 d2 −a2 b1 d1 d2 == a1 a4 −a2 a3 =


b1 b2 d 1 d2 d3 d4 d3 d4
b4 d3 d4 b3 d3 d4
b3 b4 d 3 d4

= a1 a4 det (D) − a2 a3 det (D) = (a1 a4 − a2 a3 ) det (D) = det (A) det (D) ⇒
⇒ det (P ) = det (A) det (D)
Exercise 6.1 This system is very simple to solve directly, but here the exercise asks to
solve it by finding the inverse of the matrix of coefficients. What does this mean? We
know that we can represent a linear system of n equations with n unkowns in the following
form:
AX = B
where A denotes the matrix of coefficients, while X, B are column matrices which contain
the unkown variables and the non-homogeneous terms respectively. We also know that if
the inverse of A exists then,
X = A−1 B
and the solution of the system can be found by a simple matrix multiplication.
Let us write down the matrix of coefficients for this exercise:
 
1 2 0
0 1 0 ,
0 0 3
as well as the correspondning matrices X, B
   
x 3
X = y , B = 7
  
z 9
Notice that the matrix of coefficients is equal to matrix M1 whose inverse was computed
in E3.1. It is therefore straightforward to find the solution of the system. Specifically,
      
x 3 −6 0 3 −11
1
X = M1−1 B ⇒ y  = 0 3 0 7 =  7 
3
z 0 −1 1 9 3
which implies that
x = −11, y = 7, z = 3 .

Exercise 6.2 We start again by writing down the matrix of coefficients for this system:
 
1 −2 0 1
0
 0 1 −2 
−3 2 1 0
−1 0 1 0
Observe that this time the matrix of coefficients is equal to matrix M2 whose inverse was
found in E3.2. The solution of the system can be easily obtained:
      
x −4 −2 −4 6 5 −5
 y  1 −4 −2 −3 5 10 −7
 = 
 z  2 −4 −2 −4 8  3  =  2 
   

w −2 −2 −2 4 7 −4
which leads to:
x = −5, y = −7, z = 2, w = −4

Exercise 6.3 The matrix of coefficients for this system is


 
3 1 1
A= 1 3
 1
1 1 3

which we denoted by A. Let us first check whether A has an inverse by computing its
determinant:

3 1 1
3 1 1 1 1 3
det (A) = 1 3 1 = 3 − 1 + 1 = 20 6= 0

1 3 1 3 1 1
1 1 3

The determinant is different than zero, therefore the matrix has an inverse and the corre-
sponding linear system has a unique solution. We proceed to find the inverse by evaluating
the cofactors of A:

C11 = 8, C12 = −2, C13 = −2, C21 = −2, C22 = 8, C23 = −2, C31 = −2, C32 = −2, C33 = 8

The inverse of A is then equal to:


 
8 −2 −2
1 
A−1 = −2 8 −2 ,
20
−2 −2 8

and the solution of the linear system can be obtained as follows:


      1 
x 8 −2 −2 1 − 10
−1 1  2 
X=A B⇒ y =   −2 8 −2   2 =
 
5
20 9
z −2 −2 8 3 10

which implies that


1 2 9
x=− ,y= ,z= .
10 5 10

Exercise 7: Here we are asked to find the solution of the linear system E6.3 by using
Cramer’s rule. According to Cramer’s rule, a linear rsystem of n equations with n un-
kowns, represented in matrix form as AX = B and for which det A 6= 0, has a unique
solution given by
det A1 det A2 det An
x1 = , x2 = , · · · xn =
det A det A det A
where Ai represent the matrices produced by the matrix of coefficients A whose i − th
column is replaced by B.
In this case we have a system of three unkowns and three equations and a corresponding
matrix A of size 3 × 3. The relevant matrices A1 , A2 , A3 are:
     
1 1 1 3 1 1 3 1 1
A1 = 2 3 1 , A2 = 1 2 1 , A3 = 1 3 2
3 1 3 1 3 3 1 1 3

so the solution of the system according to Cramer’s rule is:

det (A1 ) −2 1 det (A2 ) 8 2 det (A3 ) 18 9


x= = =− ,y= = = ,z= = =
det A 20 10 det A 20 5 det A 20 10
which confirms the solution we found in E6.3.

Exercise 8.1: Here we are given a choice to use whichever method we wish. Before
attempting to solve any system, we should first observe the relevant equations to check
for simplifications or the possibility of no solution etc.
Let us observe the first and the last equation of this system. The left hand sides are
mutiples of each other (they differ by a factor of two), but the right hand sides are not.
This immediatey implies that the system is incompatible/ inconsistent, it has no solution.

Exercise 8.2: Closely observing the system, we see that the first and the third equations
are exactly multiples of each other. As a result the system contains two independent
equations. Since it has three unkowns it will have an infinite number of solutions.
To find these solutions we can either solve the system directly or use Gauss-Jordan
elimination. Here we will choose the first option. Solving the first equation for y and
subsitituting into the second we find that:

y = −2 + 3z + x, y = −2 + 3z + x, y = −2 + 3z + x
2x − 3(−2 + 3z + x) + 9z = 3 − x + 6 = 3, x=3

Substituting back the value of x = 3 into the first equation we obtain y = 1+3z, therefore
the solution of the system is:

x = 3, y = 1 + 3s, z = s

where s is any real number.

You might also like