Choose a program as a group
We choose R
- Download and install “R”
- Download and install “RStudio”
- A helpful guide to using R
- Bookmark and start at this website
- This one is also helpful
We choose Mathematica
- Start with the notes for Section 5
First, try multiplying the following matrices in your chosen program as described below. Confirm that you get the same results. After that, you should do the homework problems in your chosen software. You should also do each problem by hand. Confirm that $A^{-1}=B$, $A.B=I$. Take the transpose and inverse of $C$ to get $C’$ and $C^{-1}$. Finally premultiply $A.C’$ and then postmultiply $A$ to get $C’.A$. Confirm that you get a different answer.
\(A=\left(\begin{array}{cc} 4 & 6\\ 8 & 13 \end{array}\right), B=\left(\begin{array}{cc} 13/4 & -2\\ -3/2 & 1 \end{array}\right), C=\left(\begin{array}{cc} 1 & 4\\ 3 & 2 \end{array}\right)\)
Some materials to study - Using R
Below, we take a matrix A and it’s inverse B. When we multiply them we get the 2x2 identity matrix I. Following that, I provide a matrix C, and do some matrix manipulation and mutiplication. Notice that the multiplication is not commutative, such that A.Cp is not equal to Cp.A
A=matrix(c(4,8,6,13),2,2)
A
## [,1] [,2]
## [1,] 4 6
## [2,] 8 13
B=matrix(c(13/4,-2,-3/2,1),2,2)
B
## [,1] [,2]
## [1,] 3.25 -1.5
## [2,] -2.00 1.0
A %*% B
## [,1] [,2]
## [1,] 1 0
## [2,] 0 1
# Notice that (BA)' = B'A'
C=matrix(c(1,3,4,2),2,2)
Cp=t(C)
Cp
## [,1] [,2]
## [1,] 1 3
## [2,] 4 2
Cinv=solve(C)
Cinv
## [,1] [,2]
## [1,] -0.2 0.4
## [2,] 0.3 -0.1
# Just for the sake of showing you, we multiply Cp by A, and A by Cp to get:
Cp %*% A
## [,1] [,2]
## [1,] 28 45
## [2,] 32 50
A %*% Cp
## [,1] [,2]
## [1,] 28 24
## [2,] 60 50