Skip to content

Commit

Permalink
Alegbra
Browse files Browse the repository at this point in the history
Alegbra
  • Loading branch information
akkefa committed Jun 19, 2023
1 parent e78247e commit d89a169
Show file tree
Hide file tree
Showing 6 changed files with 2,583 additions and 5 deletions.
134 changes: 134 additions & 0 deletions docs/algebra/intro.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# Algebra Introduction\n",
"\n",
"This section introduces the basic concepts of algebra, including variables, constants, and functions\n",
"\n",
"## Functions\n",
"A function is a rule that takes one or more inputs and produces a single output. For example, the function $f(x) = x + 1$ takes a single input $x$, adds one to it, and produces a single output.\n",
"In algebra, functions are written using symbols and formulas. For example, the function $f(x) = x + 1$ can be written as $f:x \\rightarrow x + 1$.\n",
"The input to a function is called the **argument** or **input variable**. The output is called the **value** or **output variable**.\n",
"\n",
"Functions are often written using the following notation:\n",
"\n",
"$$y = f(x)$$\n",
"\n",
"The notation above is read as \"$y$ equals $f$ of $x$\" or \"$y$ is a function of $x$\".\n",
"The notation above is useful because it allows us to define a function without specifying its name. For example, we can define a function $f$ as follows:\n",
"\n",
"$$f(x) = x^2$$\n",
"\n",
"We can then use the function $f$ to compute the square of any number. For example, $f(2) = 2^2 = 4$ and $f(3) = 3^2 = 9$.\n",
"\n",
"$$\n",
"\\mathrm{f}(x) = \\sqrt{x + {6}} \\\\\n",
"\\mathrm{f}(6) = \\sqrt{10 + {6}} \\\\\n",
"\\mathrm{f}(6) = 4.0\n",
"$$\n",
"\n",
"$$\n",
"\\begin{gathered}\n",
"f(x)=\\frac{x-3}{x+2} \\\\\n",
"f(3)=\\frac{3-3}{3+2}=\\frac{0}{5}=0\n",
"\\end{gathered}\n",
"$$\n",
"\n",
"### Domain and Range of a Function\n",
"The **domain** of a function is the set of all possible inputs to the function. The **range** of a function is the set of all possible outputs of the function.\n",
"For example, the function $f(x) = x^2$ has a domain of all real numbers and a range of all non-negative real numbers.\n",
"The domain of a function is often written as $D(f)$ and the range is often written as $R(f)$.\n",
"\n",
"### Piecewise Functions\n",
"A piecewise function is a function that is defined by multiple sub-functions, each sub-function applying to a different interval of the main function's domain.\n",
"For example, the function $f(x) = |x|$ is defined by two sub-functions:\n",
"\n",
"$$\n",
"f(x) = \\begin{cases}\n",
"x & \\text{if } x \\geq 0 \\\\\n",
"-x & \\text{if } x < 0\n",
"\\end{cases}\n",
"\n",
"$$\n",
"\n",
"\n",
"## Expoents\n",
"An exponent is a number that indicates how many times a base number is multiplied by itself.\n",
"For example, $2^3$ is the same as $2 \\times 2 \\times 2$ and $2^4$ is the same as $2 \\times 2 \\times 2 \\times 2$.\n",
"The number $2$ is called the **base** and the number $3$ is called the **exponent**.\n",
"Exponents are often written using the following notation:\n",
"\n",
"$$2^3 = 2 \\times 2 \\times 2 = 8$$\n",
"\n",
"The notation above is read as \"two to the power of three\" or \"two cubed\".\n",
"\n",
"### Negative Exponents\n",
"A negative exponent indicates that the base number should be divided by itself a certain number of times.\n",
"For example, $2^{-3}$ is the same as $\\frac{1}{2^3}$ and $2^{-4}$ is the same as $\\frac{1}{2^4}$.\n",
"The number $2$ is called the **base** and the number $-3$ is called the **exponent**.\n",
"Negative exponents are often written using the following notation:\n",
"\n",
"$$2^{-3} = \\frac{1}{2^3} = \\frac{1}{8}$$\n",
"\n",
"The notation above is read as \"two to the power of negative three\" or \"two to the power of minus three\".\n",
"### Fractional Exponents\n",
"A fractional exponent indicates that the base number should be multiplied by itself a certain number of times.\n",
"For example, $2^{\\frac{1}{2}}$ is the same as $\\sqrt{2}$ and $2^{\\frac{1}{3}}$ is the same as $\\sqrt[3]{2}$.\n",
"The number $2$ is called the **base** and the number $\\frac{1}{2}$ is called the **exponent**.\n",
"Fractional exponents are often written using the following notation:\n",
"\n",
"$$2^{\\frac{1}{2}} = \\sqrt{2} = 1.414213562373095$$\n",
"\n",
"The notation above is read as \"two to the power of one half\" or \"two to the power of one over two\".\n",
"\n",
"## Logarithms\n",
"A logarithm is the inverse of an exponent. For example, the logarithm of $2^3$ is $3$.\n",
"The logarithm of a number $x$ to the base $b$ is written as $\\log_b(x)$.\n",
"For example, $\\log_2(8) = 3$ because $2^3 = 8$.\n",
"\n",
"### Common Logarithms\n",
"\n",
"The common logarithm of a number $x$ is the logarithm of $x$ to the base $10$. The common logarithm of $x$ is written as $\\log(x)$.\n",
"For example, $\\log(100) = 2$ because $10^2 = 100$.\n",
"\n",
"### Natural Logarithms\n",
"The natural logarithm of a number $x$ is the logarithm of $x$ to the base $e$. The natural logarithm of $x$ is written as $\\ln(x)$.\n",
"For example, $\\ln(100) = 4.60517$ because $e^{4.60517} = 100$.\n",
"\n",
"## Polynomials\n",
"\n",
"A polynomial is an expression consisting of variables and coefficients, that involves only the operations of addition, subtraction, multiplication, and non-negative integer exponents.\n",
"\n",
"For example, $x^2 + 2x + 1$ is a polynomial because it consists of the variables $x$ and the coefficients $1$ and $2$.\n",
"\n",
"The degree of a polynomial is the highest degree of its terms. For example, the polynomial $x^2 + 2x + 1$ has a degree of $2$ because its highest degree term is $x^2$.\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "ml_notes",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.2"
},
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
}

0 comments on commit d89a169

Please sign in to comment.