Determinant
Exercise 1: Simple matrix
Expand | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
Compute the determinant
|
Exercise 2: Complex numbers
Expand | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
This example is taken from an example exam in TMA4110 - Calculus 3, check out the exam and the solution for hand calculations (only in norwegain). This is task 4. Comput the determinant
|
Eigenvalues and eigenvectors
Exercise 1
Expand | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
Find the eigenvalues and corresponding eigenvectors to matrix A, where
|
Exercise 2
Expand | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
Find the eigenvalues and corresponding eigenvectors to matrix A, where
|
Exercise 3
title | Exercise 3 |
---|
Find the eigenvalues and corresponding eigenvectors to matrix A, where
title | Solution |
---|
Code Block | ||||
---|---|---|---|---|
| ||||
import numpy as np
A = np.array([[4, 2, 3],
[-1, 1, -3],
[2, 4, 9]])
w, v = np.linalg.eig(A) # "w" are the eigenvalues, "v" the eigenvectors
print(w)
print(v)
# Output:
[8. 3. 3.]
[[-0.40824829 0.0153225 0.9635814 ]
[ 0.40824829 -0.83430241 -0.14040935]
[-0.81649658 0.55109411 -0.22758756]] |
As in exercise 2, the same eigenvalue are produced several times, though it's not the same eigenvector this time. We can interpret the output as
and
, where
and
are linearly independent and together spans a plane. The same plane can be span by the e.g. the vectors
and
for easier interpretation, though both solution are correct.
Inverse
Exercise 1
Expand | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
Find the inverse of the matrix
|
Least squares solution to a linear system
Exercise 1
Expand | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
This example is taken from an example exam in TMA4110 - Calculus 3, check out the exam and the solution for hand calculations (only in norwegain). This is task 5. Use the least squares method to find an approximation to the linear system
|
Solving a system of linear equations
Exercise 1
Expand | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
Solve the following system of linear equations:
|
Exercise 2
Expand | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||
Solve the following system of linear equations:
|
BibTeX Display Table |
---|
...