0% found this document useful (0 votes)
10 views6 pages

Week 1 Linear Algebra Exercises

The document contains exercises related to vector and matrix operations, including checking unit vectors, calculating inner products, and determining orthogonality. It also involves matrix multiplication, addition, and finding inverses using the Gauss-Jordan method. Additionally, it includes solving systems of equations using elimination methods.

Uploaded by

qiao.wen16
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views6 pages

Week 1 Linear Algebra Exercises

The document contains exercises related to vector and matrix operations, including checking unit vectors, calculating inner products, and determining orthogonality. It also involves matrix multiplication, addition, and finding inverses using the Gauss-Jordan method. Additionally, it includes solving systems of equations using elimination methods.

Uploaded by

qiao.wen16
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Week 1: Exercises

Date: October 5, 2024

Exercise 1. Consider two vectors u = (0.5, 0.4, 0.4, 0.5, 0.1, 0.4, 0.1) and v = (−1, −2, 1, −2, 3, 1, −5).
(a). Check if u or v is a unit vector.
(b). Calculate the inner product hu, vi.
(c). Are u and v orthogonal?

Solution 1. (a).
1/2
kuk2 = 0.52 + 0.42 + 0.42 + 0.52 + 0.12 + 0.42 + 0.12 =1

kvk2 = ((−1)2 + (−2)2 + 12 + (−2)2 + 32 + 12 + (−5)2 )1/2 = 3 5
Therefore, u is a unit vector, while v is not a unit vector.
(b).
hu, vi = 0.5 × (−1) + 0.4 × (−2) + 0.4 × 1 + 0.5 × (−2) + 0.1 × 3 + 0.4 × 1 + 0.1 × (−5) = −1.7
(c). u and v are not orthogonal because hu, vi =
6 0.

Exercise 2. Consider the following four matrices:


     
2 −2 4 4 4 4 −1 2  
      4 −1
A= −3 1  , B = −2 3 −7 ,
   C=
−8 2 −4 D= . (1)
4 2

5 −3 2 5 −7 2 1 −4
Calculate the following:
(a). AT B;
(b). C + B;
(c). D−1 .

Solution 2. (a).
 
  4 4 4 
2 −3 5 24 24 −6
AT B = 
 
 −2 3 −7 =  
−2 1 −3 −16 −20 6
 
2 5 −7

1
(b).
     
4 −1 2 4 4 4 8 3 6
     
C +B =
−8 2 −4 +
 
−2 3 −7 = −10 5 −11
  
2 1 −4 2 5 −7 4 6 −11
(c).
   
1 2 1 1/6 1/12
D−1 =  = 
2 ∗ 4 − (−1) ∗ 4 −4 4 −1/3 1/3

Exercise 3. Solve the following


 equations
  Ax = b:
2 −1 3 1
   
(a). A =  4 2 5 ; b = 4.
  

2 1 2 5
   
2 −1 3 1
   
(b). A =  4 −2 5 ; b = 4.
  

2 −1 4 0
   
1 −1 0 0
   
(c). A =  −1 2 −1 ; b = 0.
  

0 −1 1 0
Solution 3.
(a). Do the elimination to the augmented matrix:
     
2 −1 3 1 2 −1 3 1 9
     
4 2 5 4 → 0 4 −1 2  =⇒ x = −1
 
  
2 1 2 5 0 0 −1/2 3 −6
(b). Do the elimination to the augmented matrix:
   
2 −1 3 1 2 −1 3 1
   
4 −2 5 4 → 0 0 −1 2 =⇒ There is no solution to this system.
   
2 −1 2 0 0 0 0 1
(c). Apply the elimination to the matrix A:
   
1 −1 0 1 −1 0
   
−1 2 −1 → 0 1 −1
   
0 −1 1 0 0 0
The third variable is free so a special solution is x = [1, 1, 1]. The nullspace contains all the vectors
of αx for all α ∈ R

2
Exercise 4. Compute
 the inverses of the following matrices:
2 1
(a). Q =  ;
7 4
 
1 2 3
 
(b). Q = 4 5 6;

7 2 9
 √ √ √ 
1/ 3 1/ 2 1 6
 √ √ 
(c). Q = 1/ 3 0 −2/ 6
√ √ √

1/ 3 −1/ 2 1/ 6
 
a b
Solution 4. (a). For a matrix A =   , the inverse is
c d

1 d −b
A−1 =  , (2)
ad − bc −c a
 
4 −1
providing ad − bc 6= 0. Thus, det(Q) = 1 and Q−1 =  .
−7 2

3
(b). The Gauss-Jordan method gives
 
1 2 3 1 0 0
  ( row 1 × (−4) + row2)
[Q, I] = 4 5 6 0 1 0  −→
( row 1 × (−7) + row3)
 
7 2 9 0 0 1
 
1 2 3 1 0 0
 
−→ 0 −3 −6 −4 1 0 −→ ( row 2 × (−4) + row3)

0 −12 −12 −7 0 1
 
1 2 3 1 0 0
  ( row 2 × (−1/3))
−→ 0 −3 −6 −4 1 0 −→

( row 3 × (1/12))
0 0 12 9 −4 1
 
1 2 3 1 0 0
  ( row 3 × (−2) + row2)
−→  0 1 2 4/3 −1/3 0  −→
( row 3 × (−3) + row1)
 
0 0 1 3/4 −1/3 1/12
 
1 2 0 −5/4 1 −1/4
 
−→ 0 1 0 −1/6 1/3 −1/6  −→ ( row 2 × (−2) + row1)

0 0 1 3/4 −1/3 1/12
 
1 0 0 −11/12 1/3 1/12
 
−→ 0 1 0 −1/6 1/3 −1/6 
0 0 1 3/4 −1/3 1/12
 
−11/12 1/3 1/12
So the inverse is Q−1 = 
 
 −1/6 1/3 −1/6 .
3/4 −1/3 1/12

4
(c). The Gauss-Jordan method gives
 √ √ √ 
1/ 3 1/ 2 1 6 1 0 0
 √ √  ( row 1 × (−1) + row2)
[Q, I] =  1/ 3 0 −2/ 6 0 1 0 −→
√ √ √ ( row 1 × (−1) + row3)
 
1/ 3 −1/ 2 1/ 6 0 0 1
 √ √ √ 
1/ 3 1/ 2 1 6 1 0 0
 √ √ 
−→   0 −1/ 2 −3/ 6 −1 1 0  −→ ( row 2 × (−2) + row3)

0 − 2 0 −1 0 1
 √ √ √  √
1/ 3 1/ 2 1/ 6 1 0 0 ( row 1 × 3)
 √ √  √
−→   0 −1/ 2 −3/ 6 −1 1 0  −→ ( row 2 × (− 2))
√ √
0 0 6 1 −2 1 ( row 3 × 1/ 6)
 p √ √ 
1 3/2 1/ 2 3 0 0 √
 √ √ √  ( row 3 × (− 3) + row2)
−→  0 1 3 2 − 2 0   −→ √
√ √ √ ( row 3 × (−1/ 2) + row1)
0 0 1 1/ 6 −2/ 6 1/ 6
 p √ √ √ 
1 3/2 0 5 3/6 1/ 3 −1 12
 √ √  p
−→  0 1 0 1/ 2 0 −1 2  −→ ( row 2 × (− 3/2) + row1)
√ √ √
 
0 0 1 1/ 6 −2/ 6 1/ 6
 √ √ √ 
1 0 0 1/ 3 1/ 3 1/ 3
 √ √ 
−→  0 1 0 1/ 2 0 −1 2
√ √ √

0 0 1 1/ 6 −2/ 6 1/ 6
 √ √ √ 
1/ 3 1/ 3 1/ 3
 √ √ 
So the inverse is Q−1 = 
1/ 2 0 −1 2 T
, which is also equal to Q .
√ √ √
1/ 6 −2/ 6 1/ 6

Exercise 5. Compute the following determinants:


1 1 1 1
2 1 1 −3
(a). ;
1 2 2 5
4 3 2 1

x y x+y
(b). y x+y x ;
x+y x y

5
1−a 1 1
(c). 1 1−a 1 ;
1 1 1−a

0 1 0 ... 0
0 0 2 ... 0
.. .. .. ..
(d). . . . . ;
0 0 0 ... n − 1
n 0 0 ... 0
Solution 5.
1 1 1 1 1 1 1 1
−1 0 −4
2 1 1 −3 0 −1 0 −4
(a). = = 0 1 0 = 1.
1 2 2 5 0 1 1 4
0 −2 1
4 3 2 1 0 −1 −2 −3

(b). Add row 2, 3 to column 1,


x y x+y 1 1 1
y x+y x = 2(x + y) y x+y x
x+y x y x+y x y

1 1 1
x − y = 2(x + y) −x2 + y(x − y) = −2(x3 + y 3 ).
 
= 2(x + y) 0 x
0 −y −x

(c). Subtract row 3 from row 1 and then from row 2. This leaves
 
−a 0 a
 
 0 −a a 
 
1 1 1−a
Now add column 1 to column 3, and also column 2 to column 3. This leaves a lower triangular matrix
with −a, −a, 3 − a on the diagonal: det = (−a)(−a)(3 − a) = a2 (3 − a).

(d). By Laplace expansion, det(A) = (−1)n+1 an1 · Mn1 = (−1)n+1 n!.

Common questions

Powered by AI

To determine if vectors are orthogonal, compute their inner product. If the result is zero, the vectors are orthogonal. This insight is valuable in simplifying problems since orthogonal vectors are linearly independent and form a basis for vector spaces in which projections and decompositions are efficient .

Computing the inverse of a matrix is significant because it allows us to solve matrix equations of the form Ax = b, where x is the solution. The inverse facilitates finding x by calculating x = A⁻¹b. However, only non-singular matrices with non-zero determinants have inverses .

To calculate the matrix product AᵀB, you multiply the transpose of matrix A by matrix B, resulting in the matrix: AᵀB = [[24, 24, -6], [-16, -20, 6]].

Row operations during Gauss-Jordan elimination systematically convert the given matrix to identity form while applying the same operations to an identity matrix. This dual transformation reveals the inverse, maintaining equivalence at each stage by preserving the linear relationship between the transformed matrices .

The inner product ⟨u, v⟩ is calculated as 0.5*(-1) + 0.4*(-2) + 0.4*1 + 0.5*(-2) + 0.1*3 + 0.4*1 + 0.1*(-5) = -1.7. Vectors u and v are not orthogonal because their inner product is not zero .

The vector u is a unit vector because its magnitude is 1, calculated as ∥u∥= √(0.5² + 0.4² + 0.4² + 0.5² + 0.1² + 0.4² + 0.1²) = 1. On the other hand, vector v is not a unit vector, as its magnitude is ∥v∥ = √((-1)² + (-2)² + 1² + (-2)² + 3² + 1² + (-5)²) = 3√5, which is greater than 1 .

Matrix D is not invertible because its determinant is zero, making it singular. For a matrix to be invertible, it must be square and have a non-zero determinant .

For system (a), after Gaussian elimination, the solution is x = [9, -1, -6]. For system (b), there is no solution because one row reduces to an inconsistency, and for system (c), the system is underdetermined with a solution x = [α, 1, 1], where α is any real number .

The Gauss-Jordan method involves augmenting matrix Q with an identity matrix, then performing row operations to transform Q into the identity matrix. The sequence of operations results in the transformed identity portion becoming the inverse, Q⁻¹ .

The determinant of a matrix acts as an indicator of its invertibility; if the determinant is non-zero, the matrix is invertible, otherwise, it is not. This is because a non-zero determinant implies the matrix is full rank and spans its space .

You might also like