You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that the vector field converges to the eigenvector of $A$ with the largest eigenvalue and diverges from the eigenvector of $A$ with the smallest eigenvalue.
1176
1156
1177
1157
In fact, the eigenvectors are also the directions in which the matrix $A$ stretches or shrinks the space.
@@ -1200,13 +1180,8 @@ Use the visualization in the previous exercise to explain the trajectory of the
1200
1180
Here is one solution
1201
1181
1202
1182
```{code-cell} ipython3
1203
-
---
1204
-
mystnb:
1205
-
figure:
1206
-
caption: Vector fields of the three matrices
1207
-
name: vector-field
1208
-
---
1209
-
figure, ax = plt.subplots(1, 3, figsize=(15, 5))
1183
+
1184
+
fig, ax = plt.subplots(1, 3, figsize=(15, 5))
1210
1185
A = np.array([[sqrt(3) + 1, -2],
1211
1186
[1, sqrt(3) - 1]])
1212
1187
A = (1/(2*sqrt(2))) * A
@@ -1264,24 +1239,18 @@ for i, example in enumerate(examples):
1264
1239
ax[i].grid()
1265
1240
ax[i].set_aspect('equal', adjustable='box')
1266
1241
1242
+
fig.suptitle("Vector fields of the three matrices")
1267
1243
plt.show()
1268
1244
```
1269
1245
1270
-
+++ {"user_expressions": []}
1271
-
1272
1246
The vector fields explain why we observed the trajectories of the vector $v$ multiplied by $A$ iteratively before.
1273
1247
1274
1248
The pattern demonstrated here is because we have complex eigenvalues and eigenvectors.
1275
1249
1276
1250
We can plot the complex plane for one of the matrices using `Arrow3D` class retrieved from [stackoverflow](https://stackoverflow.com/questions/22867620/putting-arrowheads-on-vectors-in-a-3d-plot).
0 commit comments