Chapter 4

Chapter 4 Code Examples

MATLAB Matrix Examples

Matrices from Equations 4.1 and 4.2

Matrices from Equations 4.7 and 4.8

Python Matrix Examples

Matrices from Equations 4.1 and 4.2

Matrices from Equations 4.7 and 4.8

Exercises

Given matrices:
A=\begin{bmatrix}1 & 2 & 3\\ 4 & 5 & 6\end{bmatrix}
B=\begin{bmatrix}1 & 2\\ 3 & 4\end{bmatrix}
C=\begin{bmatrix}1 & 2\\ 3 & 4\\ 4 & 6\end{bmatrix}
D=\begin{bmatrix}7 & 8 & 9\\ 10 & 11 & 12\end{bmatrix}
Calculate the following:

  1. A – C’
  2. C’ + 3D
  3. BA
  4. CB
  5. B^4
  6. AA’
  7. D’D
  8. Linear equations
Skip to toolbar