|
1224 | 1224 | "\n", |
1225 | 1225 | "So our eigenvalue-eigenvector scalar multiplications do indeed correspond to our matrix-eigenvector dot-product transformations.\n", |
1226 | 1226 | "\n", |
1227 | | - "Here's the equivalent code in Python, using the ***eVals*** and ***eVecs*** variables you generated in the previous code cell:" |
| 1227 | + "Here's the equivalent code in R using the previous results:" |
1228 | 1228 | ] |
1229 | 1229 | }, |
1230 | 1230 | { |
|
1716 | 1716 | "$$ 2 \\times \\begin{bmatrix}-1 \\\\ 0\\end{bmatrix} = \\begin{bmatrix}-2 \\\\ 0\\end{bmatrix} \\;\\;\\;and\\;\\;\\; \\begin{bmatrix}2 & 0\\\\0 & 2\\end{bmatrix} \\cdot \\begin{bmatrix}-1 \\\\ 0\\end{bmatrix} = \\begin{bmatrix}-2 \\\\ 0\\end{bmatrix} $$\n", |
1717 | 1717 | "\n", |
1718 | 1718 | "\n", |
1719 | | - "Now let's use Pythonto verify and plot these transformations:" |
| 1719 | + "Now let's use R to verify and plot these transformations:" |
1720 | 1720 | ] |
1721 | 1721 | }, |
1722 | 1722 | { |
|
2186 | 2186 | "\n", |
2187 | 2187 | "$$ 1 \\times \\begin{bmatrix}-0.70710678 \\\\ 0.70710678\\end{bmatrix} = \\begin{bmatrix}-0.70710678\\\\0.70710678\\end{bmatrix} \\;\\;\\;and\\;\\;\\; \\begin{bmatrix}2 & 1\\\\1 & 2\\end{bmatrix} \\cdot \\begin{bmatrix}-0.70710678 \\\\ 0.70710678\\end{bmatrix} = \\begin{bmatrix}-0.70710678\\\\0.70710678\\end{bmatrix} $$\n", |
2188 | 2188 | "\n", |
2189 | | - "With more complex examples like this, it's generally easier to do it with Python:" |
| 2189 | + "With more complex examples like this, it's generally easier to use a tool like R:" |
2190 | 2190 | ] |
2191 | 2191 | }, |
2192 | 2192 | { |
|
2542 | 2542 | "\n", |
2543 | 2543 | "$$A=\\begin{bmatrix}3 & 2\\\\1 & 0\\end{bmatrix}$$\n", |
2544 | 2544 | "\n", |
2545 | | - "***Q*** is a matrix in which each column is an eigenvector of ***A***; which as we've seen previously, we can calculate using Python:" |
| 2545 | + "***Q*** is a matrix in which each column is an eigenvector of ***A***; which as we've seen previously, we can calculate using R:" |
2546 | 2546 | ] |
2547 | 2547 | }, |
2548 | 2548 | { |
|
3352 | 3352 | "\n", |
3353 | 3353 | "$$A^{-1}=\\begin{bmatrix}-0.4472136 & -0.70710678 \\\\-0.89442719 & 0.70710678 \\end{bmatrix}\\cdot\\begin{bmatrix}0.2 & 0\\\\0 & -1\\end{bmatrix}\\cdot\\begin{bmatrix}-0.74535599 & 0.47140452\\\\-0.94280904 & -0.74535599\\end{bmatrix}$$\n", |
3354 | 3354 | "\n", |
3355 | | - "Let's calculate that in Python:" |
| 3355 | + "Let's calculate that with R:" |
3356 | 3356 | ] |
3357 | 3357 | }, |
3358 | 3358 | { |
|
3455 | 3455 | "cell_type": "markdown", |
3456 | 3456 | "metadata": {}, |
3457 | 3457 | "source": [ |
3458 | | - "Which is the orriginal matrix A. \n", |
| 3458 | + "Which is the original matrix A. \n", |
3459 | 3459 | "\n", |
3460 | 3460 | "You can also use R verify that:\n", |
3461 | 3461 | "\n", |
|
0 commit comments