Skip to content

Commit 3960618

Browse files
committed
Exercises and solutions
1 parent bf1b5ee commit 3960618

2 files changed

Lines changed: 299 additions & 8 deletions

File tree

Linear_Transformations_Solutions.ipynb

Lines changed: 155 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -988,11 +988,125 @@
988988
},
989989
{
990990
"cell_type": "markdown",
991-
"id": "015b5f1e",
991+
"id": "62aee880",
992992
"metadata": {},
993993
"source": [
994994
"**Exercise 1:** \n",
995995
"\n",
996+
"($a$) Find a matrix that represents the reflection about the $x_1$-axis. "
997+
]
998+
},
999+
{
1000+
"cell_type": "code",
1001+
"execution_count": 10,
1002+
"id": "78651a33",
1003+
"metadata": {},
1004+
"outputs": [],
1005+
"source": [
1006+
"## Code solution here."
1007+
]
1008+
},
1009+
{
1010+
"cell_type": "markdown",
1011+
"id": "06d562bd",
1012+
"metadata": {},
1013+
"source": [
1014+
"($b$) Multiply the matrix by $\\texttt{coords}$ and plot the results."
1015+
]
1016+
},
1017+
{
1018+
"cell_type": "code",
1019+
"execution_count": 10,
1020+
"id": "b247b340",
1021+
"metadata": {},
1022+
"outputs": [],
1023+
"source": [
1024+
"## Code solution here."
1025+
]
1026+
},
1027+
{
1028+
"cell_type": "markdown",
1029+
"id": "070a66f3",
1030+
"metadata": {},
1031+
"source": [
1032+
"**Exercise 2:** \n",
1033+
"\n",
1034+
"($a$) Find a matrix that represents the reflection about the line $x_1=x_2$. "
1035+
]
1036+
},
1037+
{
1038+
"cell_type": "code",
1039+
"execution_count": 10,
1040+
"id": "daabb7a4",
1041+
"metadata": {},
1042+
"outputs": [],
1043+
"source": [
1044+
"## Code solution here."
1045+
]
1046+
},
1047+
{
1048+
"cell_type": "markdown",
1049+
"id": "19951e66",
1050+
"metadata": {},
1051+
"source": [
1052+
"($b$) Multiply the matrix by $\\texttt{coords}$ and plot the results."
1053+
]
1054+
},
1055+
{
1056+
"cell_type": "code",
1057+
"execution_count": 10,
1058+
"id": "172d37ad",
1059+
"metadata": {},
1060+
"outputs": [],
1061+
"source": [
1062+
"## Code solution here."
1063+
]
1064+
},
1065+
{
1066+
"cell_type": "markdown",
1067+
"id": "50c673a0",
1068+
"metadata": {},
1069+
"source": [
1070+
"**Exercise 3:** \n",
1071+
"\n",
1072+
"($a$) Find a matrix that represents the rotation clockwise by an angle $\\theta$. "
1073+
]
1074+
},
1075+
{
1076+
"cell_type": "code",
1077+
"execution_count": 10,
1078+
"id": "8ba3c450",
1079+
"metadata": {},
1080+
"outputs": [],
1081+
"source": [
1082+
"## Code solution here."
1083+
]
1084+
},
1085+
{
1086+
"cell_type": "markdown",
1087+
"id": "5ed5fb51",
1088+
"metadata": {},
1089+
"source": [
1090+
"($b$) Let $\\theta = 90^{\\circ}$. Multiply the matrix by $\\texttt{coords}$ and plot the results."
1091+
]
1092+
},
1093+
{
1094+
"cell_type": "code",
1095+
"execution_count": 10,
1096+
"id": "67c3e025",
1097+
"metadata": {},
1098+
"outputs": [],
1099+
"source": [
1100+
"## Code solution here."
1101+
]
1102+
},
1103+
{
1104+
"cell_type": "markdown",
1105+
"id": "015b5f1e",
1106+
"metadata": {},
1107+
"source": [
1108+
"**Exercise 4:** \n",
1109+
"\n",
9961110
"$(a)$ Find a matrix that represents a vertical shear followed by the rotation in Example 3. "
9971111
]
9981112
},
@@ -1092,12 +1206,10 @@
10921206
},
10931207
{
10941208
"cell_type": "markdown",
1095-
"id": "ffc4c0b9",
1209+
"id": "2de820c9",
10961210
"metadata": {},
10971211
"source": [
1098-
"**Exercise 2:** \n",
1099-
"\n",
1100-
"Create a new matrix of coordinates, apply one of the transformations in the Examples and plot the results."
1212+
"**Exercise 5:** Create a new matrix of coordinates and apply one of the transformations in the Examples. Plot the results."
11011213
]
11021214
},
11031215
{
@@ -1157,6 +1269,44 @@
11571269
"ax.set_aspect('equal')"
11581270
]
11591271
},
1272+
{
1273+
"cell_type": "markdown",
1274+
"id": "81b72e12",
1275+
"metadata": {},
1276+
"source": [
1277+
"**Exercise 6:** \n",
1278+
"\n",
1279+
"($a$) Construct a matrix that represents a horizontal and a vertical stretch by a factor of 2 . "
1280+
]
1281+
},
1282+
{
1283+
"cell_type": "code",
1284+
"execution_count": null,
1285+
"id": "41c66dad",
1286+
"metadata": {},
1287+
"outputs": [],
1288+
"source": [
1289+
"## Code solution here"
1290+
]
1291+
},
1292+
{
1293+
"cell_type": "markdown",
1294+
"id": "f9d40e46",
1295+
"metadata": {},
1296+
"source": [
1297+
"($b$) Create a new matrix of coordinates. Apply this transformation and plot the results."
1298+
]
1299+
},
1300+
{
1301+
"cell_type": "code",
1302+
"execution_count": null,
1303+
"id": "2f048b8d",
1304+
"metadata": {},
1305+
"outputs": [],
1306+
"source": [
1307+
"## Code solution here"
1308+
]
1309+
},
11601310
{
11611311
"cell_type": "markdown",
11621312
"id": "374361cf",

Planar_Transformations.ipynb

Lines changed: 144 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,10 +382,117 @@
382382
"cell_type": "markdown",
383383
"metadata": {},
384384
"source": [
385-
"### Exercises\n",
386-
"\n",
385+
"### Exercises"
386+
]
387+
},
388+
{
389+
"cell_type": "markdown",
390+
"metadata": {},
391+
"source": [
387392
"**Exercise 1:** \n",
388393
"\n",
394+
"($a$) Find a matrix that represents the reflection about the $x_1$-axis. "
395+
]
396+
},
397+
{
398+
"cell_type": "code",
399+
"execution_count": 10,
400+
"metadata": {},
401+
"outputs": [],
402+
"source": [
403+
"## Code solution here."
404+
]
405+
},
406+
{
407+
"cell_type": "markdown",
408+
"metadata": {},
409+
"source": [
410+
"($b$) Multiply the matrix by $\\texttt{coords}$ and plot the results."
411+
]
412+
},
413+
{
414+
"cell_type": "code",
415+
"execution_count": 10,
416+
"metadata": {},
417+
"outputs": [],
418+
"source": [
419+
"## Code solution here."
420+
]
421+
},
422+
{
423+
"cell_type": "markdown",
424+
"metadata": {},
425+
"source": [
426+
"**Exercise 2:** \n",
427+
"\n",
428+
"($a$) Find a matrix that represents the reflection about the line $x_1=x_2$. "
429+
]
430+
},
431+
{
432+
"cell_type": "code",
433+
"execution_count": 10,
434+
"metadata": {},
435+
"outputs": [],
436+
"source": [
437+
"## Code solution here."
438+
]
439+
},
440+
{
441+
"cell_type": "markdown",
442+
"metadata": {},
443+
"source": [
444+
"($b$) Multiply the matrix by $\\texttt{coords}$ and plot the results."
445+
]
446+
},
447+
{
448+
"cell_type": "code",
449+
"execution_count": 10,
450+
"metadata": {},
451+
"outputs": [],
452+
"source": [
453+
"## Code solution here."
454+
]
455+
},
456+
{
457+
"cell_type": "markdown",
458+
"metadata": {},
459+
"source": [
460+
"**Exercise 3:** \n",
461+
"\n",
462+
"($a$) Find a matrix that represents the rotation clockwise by an angle $\\theta$. "
463+
]
464+
},
465+
{
466+
"cell_type": "code",
467+
"execution_count": 10,
468+
"metadata": {},
469+
"outputs": [],
470+
"source": [
471+
"## Code solution here."
472+
]
473+
},
474+
{
475+
"cell_type": "markdown",
476+
"metadata": {},
477+
"source": [
478+
"($b$) Let $\\theta = 90^{\\circ}$. Multiply the matrix by $\\texttt{coords}$ and plot the results."
479+
]
480+
},
481+
{
482+
"cell_type": "code",
483+
"execution_count": 10,
484+
"metadata": {},
485+
"outputs": [],
486+
"source": [
487+
"## Code solution here."
488+
]
489+
},
490+
{
491+
"cell_type": "markdown",
492+
"metadata": {},
493+
"source": [
494+
"**Exercise 4:** \n",
495+
"\n",
389496
"($a$) Find a matrix that represents a vertical shear followed by the rotation in Example 3. "
390497
]
391498
},
@@ -418,7 +525,7 @@
418525
"cell_type": "markdown",
419526
"metadata": {},
420527
"source": [
421-
"**Exercise 2:** Create a new matrix of coordinates, apply one of the transformations in the Examples and plot the results."
528+
"**Exercise 5:** Create a new matrix of coordinates and apply one of the transformations in the Examples. Plot the results."
422529
]
423530
},
424531
{
@@ -429,6 +536,40 @@
429536
"source": [
430537
"## Code solution here."
431538
]
539+
},
540+
{
541+
"cell_type": "markdown",
542+
"metadata": {},
543+
"source": [
544+
"**Exercise 6:** \n",
545+
"\n",
546+
"($a$) Construct a matrix that represents a horizontal and a vertical stretch by a factor of 2 . "
547+
]
548+
},
549+
{
550+
"cell_type": "code",
551+
"execution_count": null,
552+
"metadata": {},
553+
"outputs": [],
554+
"source": [
555+
"## Code solution here"
556+
]
557+
},
558+
{
559+
"cell_type": "markdown",
560+
"metadata": {},
561+
"source": [
562+
"($b$) Create a new matrix of coordinates. Apply this transformation and plot the results."
563+
]
564+
},
565+
{
566+
"cell_type": "code",
567+
"execution_count": null,
568+
"metadata": {},
569+
"outputs": [],
570+
"source": [
571+
"## Code solution here"
572+
]
432573
}
433574
],
434575
"metadata": {

0 commit comments

Comments
 (0)