|
10 | 10 | "\n",
|
11 | 11 | "[Types of numbers](#Types-of-numbers) \n",
|
12 | 12 | "[Operations on numbers](#Operations-on-numbers) \n",
|
| 13 | + "[Fractions](#Fractions) \n", |
| 14 | + "[Factoring](#Factoring) \n", |
| 15 | + "[Prime numbers](#Prime-numbers) \n", |
| 16 | + "[Factorials](#Factorials) \n", |
13 | 17 | "[Exponents](#Exponents) \n",
|
14 | 18 | "\n",
|
15 | 19 | "<a id=\"number-types\"></a><a id=\"Types-of-numbers\"></a>\n",
|
|
58 | 62 | "Operations of the same priority are applied left to right, so the order of operations for `3 + 6 - 2` is `(3 + 6) - 2`.\n",
|
59 | 63 | "For operations of different priorities, in programs it might sometimes be clearer and less error prone to use parentheses even if they not necessary, so `5 + 8 / 4 - 2` might be written as `5 + (8 / 4) - 2`. \n",
|
60 | 64 | "\n",
|
| 65 | + "<a id=\"Fractions\"></a>\n", |
| 66 | + "## Fractions\n", |
| 67 | + "Fractions are a way to show a number as divisions of another number.\n", |
| 68 | + "The fraction $9 / 3$ shows the number of times 9 can be divided into groups of 3, which is 3.\n", |
| 69 | + "Fractions may not represent a whole number, such as $7 / 2$, where 2 does not divide into 7 evenly.\n", |
| 70 | + "\n", |
| 71 | + "There are a number of rules to combine fractions.\n", |
| 72 | + "\n", |
| 73 | + "Rule |Example|\n", |
| 74 | + ":- |:-\n", |
| 75 | + "Addition|$\\frac{a}{c}~$+$~\\frac{b}{c}~$=$~\\frac{a~+~b}{c}$|\n", |
| 76 | + "Subtraction|$\\frac{a}{c}~$-$~\\frac{b}{c}~$=$~\\frac{a~-~b}{c}$|\n", |
| 77 | + "Multiplication|$\\frac{a}{c}~$$\\cdot$$~\\frac{b}{c}~$=$\\frac{a~\\cdot~b}{c}$|\n", |
| 78 | + "Division|$\\frac{a}{b}~$$\\div$$~\\frac{c}{d}~$=$\\frac{a}{b}~$$\\cdot$$~\\frac{d}{c}~$|\n", |
| 79 | + "\n", |
| 80 | + "<a id=\"Factoring\"></a>\n", |
| 81 | + "## Factoring\n", |
| 82 | + "A number `N` may be a multiple of whole numbers `a`, `b`, `c`, etc. \n", |
| 83 | + "\n", |
| 84 | + "$N = a\\>\\cdot\\>b\\>\\cdot\\>c\\>\\cdot\\>\\cdots$ \n", |
| 85 | + "\n", |
| 86 | + "The numbers `a`, `b`, `c`, etc. are the *factors* of `N`.\n", |
| 87 | + "We say `N` is *evenly divisible* by `a`, `b`, `c`, etc.\n", |
| 88 | + "\n", |
| 89 | + "<a id=\"Prime-numbers\"></a>\n", |
| 90 | + "## Prime numbers\n", |
| 91 | + "A number always at least has two factors, 1 and itself. \n", |
| 92 | + "\n", |
| 93 | + "$N = 1\\>\\cdot\\>N$ \n", |
| 94 | + "\n", |
| 95 | + "A number that is only evenly divisible by 1 and itself is a *prime number*.\n", |
| 96 | + "\n", |
| 97 | + "We say that when the factorization of `N` is\n", |
| 98 | + "\n", |
| 99 | + "$N = a\\>\\cdot\\>b\\>\\cdot\\>c\\>\\cdot\\>\\cdots$ \n", |
| 100 | + "\n", |
| 101 | + "if all of `a`, `b`, `c`, etc. are prime, that is the *prime factorization* of `N`.\n", |
| 102 | + "\n", |
| 103 | + "<a id=\"Factorials\"></a>\n", |
| 104 | + "## Factorials\n", |
| 105 | + "A special case of factoring is when the factors of a number are all positive whole numbers less than or equal to `n`.\n", |
| 106 | + "This number is the *factorial* of `n` or $n!$.\n", |
| 107 | + "\n", |
| 108 | + "$n! = n \\cdot (n - 1) \\cdot (n - 2) \\cdot\\>\\cdots\\> \\cdot 1$\n", |
| 109 | + "\n", |
61 | 110 | "<a id=\"Exponents\"></a>\n",
|
62 | 111 | "## Exponents\n",
|
63 | 112 | "Exponents are a way to represent repeated multiplication of the same number with fewer symbols. \n",
|
64 | 113 | "If a number is multiplied several times, the number of times it is multiplied can be represented with an *exponent*.\n",
|
65 | 114 | "For example, multiplying 2 three times can be represented using an exponent of 3:\n",
|
66 | 115 | "\n",
|
67 |
| - "$2 \\cdot 2 \\cdot 2 = 2^3 = 8 $\n", |
| 116 | + "$\\qquad 2 \\cdot 2 \\cdot 2 = 2^3 = 8 $\n", |
68 | 117 | "\n",
|
69 | 118 | "We say that $2^3$ is \"two raised to the power 3\".\n",
|
70 | 119 | "The value 2 is the *base* of the exponent.\n",
|
71 | 120 | "We can then do arithmetic on numbers with exponents.\n",
|
72 | 121 | "We notice that is the same as \n",
|
73 | 122 | "\n",
|
74 |
| - "$(2 \\cdot 2) \\cdot 2 = 2^2 \\cdot 2^1 = 2^3$ \n", |
| 123 | + "$\\qquad (2 \\cdot 2) \\cdot 2 = 2^2 \\cdot 2^1 = 2^3$ \n", |
75 | 124 | "\n",
|
76 | 125 | "where $2^1$ is 2 \"multiplied once\". \n",
|
77 | 126 | "\n",
|
78 | 127 | "We notice a pattern that\n",
|
79 | 128 | "\n",
|
80 |
| - "$2^2 \\cdot 2^1 = 2^3 = 2^{2 + 1}$\n", |
| 129 | + "$\\qquad 2^2 \\cdot 2^1 = 2^3 = 2^{2 + 1}$\n", |
81 | 130 | "\n",
|
82 | 131 | "so that when numbers with exponents are multiplied together, the exponents add.\n",
|
83 | 132 | "There is one interesting result from this.\n",
|
84 | 133 | "We can create a number with an exponent of 0, $2^0$, or \"two multiplied 0 times\", where it is not obvious what that means.\n",
|
85 | 134 | "When we multiply that number by another number with an exponent we get\n",
|
86 | 135 | "\n",
|
87 |
| - "$2^1 \\cdot 2^0 = 2^{1 + 0} = 2$\n", |
| 136 | + "$\\qquad 2^1 \\cdot 2^0 = 2^{1 + 0} = 2$\n", |
88 | 137 | "\n",
|
89 | 138 | "What value is $2^0$? The only way to get that result is\n",
|
90 | 139 | "\n",
|
91 |
| - "$2^1 \\cdot 1 = 2$\n", |
| 140 | + "$\\qquad 2^1 \\cdot 1 = 2$\n", |
92 | 141 | "\n",
|
93 | 142 | "Therefore $2^0$ must be 1.\n",
|
94 |
| - "That fact will be used in the Hindu number system below.\n", |
95 |
| - "\n", |
96 |
| - "There is a reverse of exponents called *logarithms*. \n", |
97 |
| - "If we say a number *N* has the value of a base *B* with an exponent *m*\n", |
| 143 | + "That fact will be used in the [Hindu number system](./Number-systems.ipynb#Positional-number-systems).\n", |
| 144 | + "\n", |
| 145 | + "### Exponent rules\n", |
| 146 | + "This is a list of all exponent rules.\n", |
| 147 | + "Rule|Formula\n", |
| 148 | + "|:- |:-\n", |
| 149 | + "Product |$ a^m \\cdot a^n~$=$~a^{m + n}$ \n", |
| 150 | + "Quotient |$a^m$$\\div$$a^n~$=$~a^{m - n}$ \n", |
| 151 | + "Power of a Power |$(a^m)^n~$=$~a^{mn}$ \n", |
| 152 | + "Power of a Product |$(ab)^m~$=$~a^m$$\\cdot$$b^m$ \n", |
| 153 | + "Power of a Quotient |$(\\frac{a}{b})^m~$=$~\\frac{a^m}{b^m}$ \n", |
| 154 | + "Zero Exponent |$a^0~$=$~1$ \n", |
| 155 | + "Negative Exponent |$a^{-1}~$=$~\\frac{1}{a^m}$ \n", |
| 156 | + "Fractional Exponent |$a^{\\frac{m}{n}}~$=$~\\sqrt[n]{a^m}$ \n", |
| 157 | + "\n", |
| 158 | + "### Roots\n", |
| 159 | + "The square *root* of a number `n` is the number which if multplied by itself will be `n`. \n", |
| 160 | + "$\\qquad \\sqrt{n} \\cdot \\sqrt{n} = (\\sqrt{n})^2 = n$ \n", |
| 161 | + "The cube root is the third root of `n`. \n", |
| 162 | + "$\\qquad \\sqrt[3]{n} \\cdot \\sqrt[3]{n} \\cdot \\sqrt[3]{n} = (\\sqrt[3]{n})^3 = n$ \n", |
| 163 | + "\n", |
| 164 | + "The fourth root is $\\sqrt[4]{n}$, and so on.\n", |
| 165 | + "We say this following the Fractional exponent rule. \n", |
| 166 | + "$\\qquad \\sqrt[n]{a}\\>=\\sqrt[n]{a^1}\\>=\\>a^{\\frac{1}{n}}$ \n", |
| 167 | + "\n", |
| 168 | + "### Logarithms\n", |
| 169 | + "\n", |
| 170 | + "*Logarithms* are the reverse of exponents. \n", |
| 171 | + "If we say a number `N` has the value of a base `B` to the power `m`.\n", |
98 | 172 | " \n",
|
99 | 173 | "$N = B^m$\n",
|
100 | 174 | "\n",
|
101 |
| - "we say that exponent m is the logarithm of N, base B\n", |
| 175 | + "The logarithm of `N`, base `B`, is `m`. \n", |
102 | 176 | "\n",
|
103 | 177 | "${log N}_B = m$\n",
|
104 | 178 | "\n",
|
105 |
| - "Logarithms are another convenient way to represent large numbers.\n", |
| 179 | + "Logarithms are another convenient way to represent large numbers. For `N` = 1000000\n", |
| 180 | + "\n", |
| 181 | + "$log_{10} N = log_{10} 1000000 = log_{10}\\> 10^6 = 6$\n", |
106 | 182 | "\n"
|
107 | 183 | ]
|
108 | 184 | },
|
109 | 185 | {
|
110 | 186 | "cell_type": "code",
|
111 | 187 | "execution_count": null,
|
112 |
| - "id": "bf578583", |
| 188 | + "id": "58994d42", |
113 | 189 | "metadata": {},
|
114 | 190 | "outputs": [],
|
115 | 191 | "source": []
|
|
0 commit comments