Son Tu

Từ Nguyễn Thái Sơn

Summer 2024


CMSE/MTH 314 Matrix Algebra with Computational Applications

Office hours:
Getting help:

Materials

Lecture 11   ·   2024-06-18   ·   Diagonalization & Singular value decomposition
Lecture 10   ·   2024-06-13   ·   Eigenvalue & Markov's problem
Lecture 09   ·   2024-06-11   ·   Gram-Schmidt process
Lecture 08   ·   2024-06-06   ·   Change of basis

Key takeaways:

For $x\in V$ then

$$ [x]_\mathcal{B} = \begin{bmatrix} x_1\\ \vdots\\ x_n \end{bmatrix} \qquad\text{means} \qquad x =[x]_\mathcal{E} = x_1b_1 + \ldots + x_nb_n. $$

In other words, this is the key equation:

$$ [ x ] _ { \mathcal{E} } = [ b_1, \ldots, b_n ] \cdot [ x ] _ {\mathcal{B}} = [c_1, \ldots, c_n] \cdot [ x ] _ {\mathcal{C}}. $$

Then we can convert between bases as

$$ \fbox{$ \displaystyle [ x ] _ { \mathcal{C} } = [ c_1,\ldots, c_n ] ^ {-1} \cdot [b_1,\ldots, b_n] \cdot [ x ] _ { \mathcal{B} } . $} $$

Lecture 07   ·   2024-06-04   ·   Vector space 2

Key takeaways: Given a matrix $A$ of size $m\times n$

Lecture 06   ·   2024-05-30   ·   Vector space I
Lecture 05   ·   2024-05-28   ·   Linear transformation

Key takeaways:

Lecture 04   ·   2024-05-23   ·   Determinant

Key takeaways:

$$ A = \begin{bmatrix} 1 & -4 & 2 \\ -2 & 8 & -4 \\ -1 & 7 & 0 \end{bmatrix} $$

import numpy as np
A = np.array([[1,-4,2], [-2,8, -4], [-1, 7, 0]])
det = np.linalg.det(A)

Lecture 03   ·   2024-05-21   ·   Inverse of Matrix

Key takeaways:

Python code to do the augmented matrix and perfoming row operations

Let

$$ A = \begin{bmatrix} 0 & 1 & 2 \\ 1 & 0 & 3 \\ 4 &-3 & 8 \end{bmatrix}. $$

To find the inverse of $A$, we form the augmented matrix

$$ [A|B] = \begin{bmatrix} 0 & 1 & 2 & | & 1 & 0 & 0\\ 1 & 0 & 3 & | & 0 & 1 & 0\\ 4 &-3 & 8 & | & 0 & 0 & 1 \end{bmatrix}. $$

Then we perform row operations to find the reduced row echelon form of $A$ (rref), then the matrix obtained on the right will be $A^{-1}$, given the rref(A) = I_3. Otherwise $A$ is not invertible.

import numpy as np
import sympy as sym

A = sym.Matrix([
    [0, 1, 2],
    [1, 0, 3],
    [4,-3, 8]
])

# stack A|B to form the augmented matrix
AB = np.column_stack((A,np.eye(3)))

# convert AB to sympy
AB = sym.Matrix(AB)

# perform the row operations to find the reduced echelon form of A
AB_rref = AB.rref()[0]

# select the matrix on the right hand side
Ainv = AB_rref[:, 3:6]

Ainv

We obtain

$$ A ^ { -1 } = \begin{bmatrix} -4.5 & 7 & -1.5 \\ -2 & 4 & -1 \\ 1.5 & -2 & 0.5 \end{bmatrix} $$


© 2016-2024 Son N. T. Tu. Powered by Ark. Last updated: October 02, 2024.