|
6 | 6 | "source": [ |
7 | 7 | "## Inner Products\n", |
8 | 8 | "\n", |
9 | | - "In this chapter, we introduce the idea of an inner product, examine the additional structure that it imposes on a vector space, and look at some common applications. An inner product is an operation on two vectors in a vector space that is defined in such a way as to satisfy certain algebraic requirements. To begin, we will focus only on one specific inner product defined for vectors in $\\mathbb{R}^n$. Later in the chapter we will consider other examples of inner products in $\\mathbb{R}^n$.\n", |
| 9 | + "In this chapter we introduce the idea of an inner product, examine the additional structure that it imposes on a vector space, and look at some common applications. An inner product is an operation on two vectors in a vector space that is defined in such a way as to satisfy certain algebraic requirements. To begin, we will focus only on one specific inner product defined for vectors in $\\mathbb{R}^n$. Later in the chapter we will consider other examples of inner products in $\\mathbb{R}^n$.\n", |
10 | 10 | "\n", |
11 | 11 | "The **dot product** is the most common example of an inner product. For vectors $U$ and $V$ in $\\mathbb{R}^n$, the dot product is written as $U\\cdot V$, and is defined in the following way.\n", |
12 | 12 | "\n", |
|
445 | 445 | "source": [ |
446 | 446 | "### Exercises\n", |
447 | 447 | "\n", |
448 | | - "- Create a Python function named $\\texttt{Magnitude}$ that accepts as an argument vector in the form of a NumPy array object with shape $n\\times 1$, and returns the magnitude of that vector." |
| 448 | + "**Exercise 1:** Create a Python function named $\\texttt{Magnitude}$ that accepts as an argument vector in the form of a NumPy array object with shape $n\\times 1$, and returns the magnitude of that vector." |
449 | 449 | ] |
450 | 450 | }, |
451 | 451 | { |
|
461 | 461 | "cell_type": "markdown", |
462 | 462 | "metadata": {}, |
463 | 463 | "source": [ |
464 | | - "- Use the $\\texttt{random}$ module of NumPy to generate random $4\\times 1$ vectors $U$, $V$, and $W$, and a random scalar $k$. Verify the algebraic properties of the dot product listed above. Try to make use of a conditional statement to check each statement." |
| 464 | + "**Exercise 2:** Use the $\\texttt{random}$ module of NumPy to generate random $4\\times 1$ vectors $U$, $V$, and $W$, and a random scalar $k$. Verify the algebraic properties of the dot product listed above. Try to make use of a conditional statement to check each statement." |
465 | 465 | ] |
466 | 466 | }, |
467 | 467 | { |
468 | 468 | "cell_type": "code", |
469 | | - "execution_count": null, |
| 469 | + "execution_count": 9, |
470 | 470 | "metadata": {}, |
471 | 471 | "outputs": [], |
472 | 472 | "source": [ |
|
477 | 477 | "cell_type": "markdown", |
478 | 478 | "metadata": {}, |
479 | 479 | "source": [ |
480 | | - "- Let $X$ and $Y$ be the following vectors.\n", |
| 480 | + "**Exercise 3:** Let $X$ and $Y$ be the following vectors.\n", |
481 | 481 | "\n", |
482 | 482 | "$$\n", |
483 | 483 | "\\begin{equation}\n", |
|
486 | 486 | "\\end{equation}\n", |
487 | 487 | "$$\n", |
488 | 488 | "\n", |
489 | | - "- Determine the angle between $X$ and $Y$. (*You will need the $\\texttt{acos}$ function in Python's $\\texttt{math}$ module.*)" |
| 489 | + "$(a)$ Determine the angle between $X$ and $Y$. (*You will need the $\\texttt{acos}$ function in Python's $\\texttt{math}$ module.*)" |
490 | 490 | ] |
491 | 491 | }, |
492 | 492 | { |
|
502 | 502 | "cell_type": "markdown", |
503 | 503 | "metadata": {}, |
504 | 504 | "source": [ |
505 | | - "- Find a vector in $\\mathbb{R}^3$ that is orthogonal to the vector $X$. Verify your answer with a computation." |
| 505 | + "$(b)$ Find a vector in $\\mathbb{R}^3$ that is orthogonal to the vector $X$. Verify your answer with a computation." |
506 | 506 | ] |
507 | 507 | }, |
508 | 508 | { |
|
518 | 518 | "cell_type": "markdown", |
519 | 519 | "metadata": {}, |
520 | 520 | "source": [ |
521 | | - "- Construct a unit vector $Z$ such that $Z\\cdot Y = -||Y||$. Verify your answer with a computation." |
| 521 | + "$(c)$ Construct a unit vector $Z$ such that $Z\\cdot Y = -||Y||$. Verify your answer with a computation." |
522 | 522 | ] |
523 | 523 | }, |
524 | 524 | { |
|
0 commit comments