Notes Home - Internal Only | Notation Home | Notation Basic | Notation-Algebra |
Core algebraic equations re-created from http://tutorial.math.lamar.edu/pdf/Algebra_Cheat_Sheet.pdf.
At times recreating the above is easier when working on equation components individually. When these attempts result in error, I’ve left these in and noted as such. Tables below label and show components at the top separate from the actual properties following. Erroneous results carry an error label.
Note the use of \displaystyle to create even sized components of the fractions. Using \Large by itself results in larger display but uneven fractional components. Combining \displaystyle \Large generally creates the desired result. The table below illustrates different combinations of these two applied to fractions.
| R LaTeX Syntax | Result |
|---|---|
$ab + ac = a(b +c)$ |
\(ab + ac = a(b +c)\) |
$\displaystyle \Large a \left( \frac{b}{c} \right) = \frac {ab}{c}$ |
\(\displaystyle \Large a \left( \frac{b}{c} \right) = \frac {ab}{c}\) |
$\displaystyle \Large \frac{\left(\frac{a}{b}\right)}{c} = \frac{a}{bc}$ |
\(\displaystyle \Large \frac{\left(\frac{a}{b}\right)}{c} = \frac{a}{bc}\) |
$\displaystyle \Large \frac{a}{ \left(\frac{b}{c}\right)} = \frac{ac}{b}$ |
\(\displaystyle \Large \frac{a}{ \left(\frac{b}{c}\right)} = \frac{ac}{b}\) |
$\displaystyle \frac{a}{\Large \left(\frac{b}{c}\right)} = \frac{ac}{b}$ |
\(\displaystyle \frac{a}{\Large \left(\frac{b}{c}\right)} = \frac{ac}{b}\) |
$\displaystyle \Large \frac{a}{\Large \left(\frac{b}{c}\right)} = \frac{ac}{b}$ |
\(\displaystyle \Large \frac{a}{\Large \left(\frac{b}{c}\right)} = \frac{ac}{b}\) |
$\displaystyle \frac{a}{\left(\frac{b}{c}\right)} = \frac{ac}{b}$ |
\(\displaystyle \frac{a}{\left(\frac{b}{c}\right)} = \frac{ac}{b}\) |
$\displaystyle \Large \frac{a}{b}+\frac{c}{d}= \frac{ad+bc}{bd}$ |
\(\displaystyle \Large \frac{a}{b}+\frac{c}{d}= \frac{ad+bc}{bd}\) |
$\displaystyle \Large \frac{a}{b}-\frac{c}{d}= \frac{ad-bc}{bd}$ |
\(\displaystyle \Large \frac{a}{b}-\frac{c}{d}= \frac{ad-bc}{bd}\) |
$\displaystyle \Large \frac{a-b}{c-d}=\frac{b-a}{d-c}$ |
\(\displaystyle \Large \frac{a-b}{c-d}=\frac{b-a}{d-c}\) |
$\displaystyle \Large \frac{a+b}{c}=\frac{a}{c}+\frac{b}{c}$ |
\(\displaystyle \Large \frac{a+b}{c}=\frac{a}{c}+\frac{b}{c}\) |
$\displaystyle \Large \frac{ab+ac}{a}=b+c, a \neq 0$ |
\(\displaystyle \Large \frac{ab+ac}{a}=b+c, a \neq 0\) |
$\displaystyle \Large \frac{(\frac{a}{b})}{(\frac{c}{d})} = \frac{ad}{bc}$ |
\(\displaystyle \Large \frac{\left(\frac{a}{b}\right)}{\left(\frac{c}{d}\right)} = \frac{ad}{bc}\) |
See Dev notes below for application of alternative table format to accommodate multi-line rows. Formulas below split across multiple lines can be concatenated when used outside a table.
| R Latex Syntax | Result |
|---|---|
$\Large a^n a^m = a^{n+m}$ |
\(\Large a^n a^m = a^{n+m}\) |
$\Large(a^n)^m = a^{nm}$ |
\(\Large(a^n)^m = a^{nm}\) |
$\Large(ab)^n = a^n b^n$ |
\(\Large(ab)^n = a^n b^n\) |
$\Large a^{-n} = \dfrac {1}{a^n}$ |
\(\Large a^{-n} = \dfrac {1}{a^n}\) |
$\Large \left( \dfrac{a}{b} \right)^{-n}$ $= \left(\dfrac{b}{a}\right)^n$ $= \left(\dfrac{b^n}{a^n}\right)$ |
\(\Large \left( \dfrac{a}{b} \right)^{-n}\) \(= \left (\dfrac{b}{a}\right)^n\) \(= \left(\dfrac{b^n}{a^n}\right)\) |
$\Large \dfrac{a^n}{a^m} = a^{n-m}$ $= \dfrac{1}{a^{m-n}}$ |
\(\Large \dfrac{a^n}{a^m} = a^{n-m} = \dfrac{1}{a^{m-n}}\) |
$\Large a^0 = 1, a \neq 0$ |
\(\Large a^0 = 1, a \neq 0\) |
$\Large \left( \dfrac{a}{b} \right)^n$ $= \dfrac{a^n}{b^n}$ |
\(\Large \left( \dfrac{a}{b} \right)^n = \dfrac{a^n}{b^n}\) |
$\Large a^\frac{n}{m}$ $= \left(a^\frac{1}{m}\right)^n$ $= \left(a^n \right)^{\frac{1}{m}}$ |
\(\Large a^\frac{n}{m}\) \(=\left(a^\frac{1}{m}\right)^n\) \(= \left(a^n \right)^{\frac{1}{m}}\) |
Display of radicals on screen and in print is difficult. Note the use of \mathstrut in the 5th example to align radical signs and the use of \leftroot and \uproot to control relationship of the index(nth root) to the radix (radical sign)
| R LaTeX Syntax | Result |
|---|---|
$\Large \sqrt[n]a = a^{\frac{1}{n}}$ |
\(\Large \sqrt[n]a = a^{\frac{1}{n}}\) |
| read above as | the nth root of a equals a to the power of 1 over n |
$\Large \sqrt[m]{\sqrt[n]a} = \sqrt[nm]a$ |
\(\Large \sqrt[m]{\sqrt[n]a} = \sqrt[nm]a\) |
| read above as | the mth root of the nth root of a equals the n times mth root of a |
$\Large \sqrt[n]a^n = a$ , if n is odd |
\(\Large \sqrt[n]a^n = a\) , if n is odd |
| read above as | the nth root of a to the n equals a, if n is odd |
$\Large \sqrt[n]a^n = \lvert a \rvert$ , if n is even |
\(\Large \sqrt[n]a^n = \lvert a \rvert\) , if n is even |
| read above as | the nth root of a to the n equals the absolute value of a, if n is even |
$\Large \sqrt[n]{ab} =\sqrt[n]{\mathstrut a} \sqrt[n]{\mathstrut b}$ |
\(\Large \sqrt[n]{ab} = \sqrt[n]{\mathstrut a} \sqrt[n]{\mathstrut b}\) |
| read above as | the nth root of ab equals the nth root of a times the nth root of b |
$\Large \sqrt[n]{\frac{a}{b}} = \frac{\sqrt[n]a}{\sqrt[n]b}$ |
\(\Large \sqrt[\leftroot{-3}\uproot{3}n]\frac{a}{b} = \tfrac{\sqrt[\leftroot{-3}\uproot{3}n]a}{\sqrt[\leftroot{-3}\uproot{3}n]b}\) |
| read above as | the nth root of a over b equals the nth root of a over the nth root of b |
| R LaTeX Syntax | Result |
|---|---|
If a < b then a+c < b+c and a-c < b-c |
If a < b then a+c < b+c and a-c < b-c |
| read above as | If a is less than b then a plus c is less than b plus cc and a minus is less than b minus c |
If a < b and c > 0 then ac < bc and $\dfrac {a}{c} < \dfrac{b}{c}$ |
If a < b and c > 0 then ac < bc and \(\dfrac {a}{c} < \dfrac{b}{c}\) |
| read above as | If a is less than b and c is greater than zero then a times c is less than b times c and a divided by c is less than b divided by c |
If a < b and c < 0 then ac > bc and $\dfrac {a}{c} > \dfrac{b}{c}$ |
If a < b and c < 0 then ac > bc and \(\dfrac {a}{c} > \dfrac{b}{c}\) |
| read above as | If a is less than b and c less than zero then a times c is greater than b times c and a divided by c is greater than b divided by c |
Table format temporarily abandoned to present multi-line LaTeX for displaying conditional equation.
R Latex Syntax:$$\Large |a|= \begin{cases} \ a,& \text{if } a\geq 0\\ -a, & \text{if } a < 0 \end{cases}$$
Produces:
\[\Large |a|=
\begin{cases}
\ a, & \text{if } a\geq 0\\
-a, & \text{if } a < 0
\end{cases}\] Read above as: a is positive when a is greater than or equal to zero; or is negative when a is less than zero. See Khan Academy video https://www.khanacademy.org/math/algebra/solving-linear-equations-and-inequalities/absolute-value-equations/v/absolute-value-equation-example-2 for implentation when applied to a problem.
| R LaTeX Syntax | Result |
|---|---|
$\Large |a| \geq 0$ |
\(\Large |a| \geq 0\) |
| read above as | absolute value of a is greater than or equal to zero |
$\Large |-a| = |a|$ |
\(\Large |-a| = |a|\) |
| read above as | the absolute value of minus a equals the absolute value of a |
$\Large |ab| = |a||b|$ |
\(\Large |ab| = |a||b|\) |
| read above as | absolute value of a times b is equal to the absolute value of a times the absolute value of b |
$\Large |\frac{a}{b}| = \frac{|a|}{|b|}$ |
\(\Large |\frac{a}{b}| = \frac{|a|}{|b|}\) |
| read above as | the absolute value of a divided by b equals the absolute value of a divided by the absolute value of b |
$\Large |a + b| \leq |a|+|b|$ |
\(\Large |a + b| \leq |a|+|b|\) Triangle inequality (right side) |
| read above as | the absolute value of the sum of a and b is less than or equal to the sum of the abs value of a plus the abs value of b |
$\Large ||a|-|b|| \leg |a + b| \leq |a|+|b|$ |
\(\Large ||a|-|b|| \leq |a + b| \leq |a|+|b|\) Triangle inequality (full) |
| read above as | the absolute value of the abs value of a minus the abs value of b is less than or equal to the absolute value of a plus b which is less than or equal to the sum of the abs value of a plus the abs value of b |
If \(P_1 = (x_1, y_1)\) and \(P_2 = (x_2, y_2)\) are two points the distance between them is
\(\Large d(P_1,P_2) = \sqrt{(x_2 - x_1)^2 +(y_2 - y_1)^2}\)
| R LaTeX Syntax | Result |
|---|---|
$\Large i = \sqrt{-1}$ |
\(\Large i = \sqrt{-1}\) |
| read above as | the imaginary number i equals the square root of minus one |
$\Large i^2 = -1$ |
\(\Large i^2 = -1\) |
| read above as | imaginary number i squared equals minus one |
$\Large \sqrt{-a} = i\sqrt{a}$ if $a \geq 0$ |
\(\Large \sqrt{-a} = i\sqrt{a}\) if \(a \geq 0\) |
$(a+bi)+(c+di)= a+c+(b+d)i$ |
\((a+bi)+(c+di)= a+c+(b+d)i\) |
| read above as | a plus imaginary number bi plus c plus imaginary number di equals a plus c plus b and d times i, that is square root of minus one |
$(a+bi)-(c+di)= a+c+(b+d)i$ |
\((a+bi)+(c+di)= a-c+(b-d)i\) |
| read above as | a plus imaginary number bi minus c plus imaginary number di equals a minus c plus b minus d times i |
$(a+bi)(c+di)= ac-bd + (ad-bc)i$ |
\((a+bi)(c+di)= ac-bd + (ad-bc)i\) |
| read above as | a plus imaginary number bi times c plus imaginary number di equals ac minus bd plus ad minus bc times i |
$(a+bi)(a-bi) = a^2 + b^2$ |
\((a+bi)(a-bi) = a^2 + b^2\) |
| read above as | a plus imaginary number bi times a minus imaginary number bi = a squared plus b squared |
$\Large |a + bi| = \sqrt{a^2+b^2}$ |
\(\Large |a + bi| = \sqrt{a^2+b^2}\) |
| read above as | the absolute value of a plus imaginary number b equals the sqare root of a squared plus b squared; AKA Complex Modulus |
$\overline{(a + bi)} = a - bi$ |
\(\overline{(a + bi)} = a - bi\) |
| read above as | the complex conjugate of a plus imaginary number bi equals a minus the imaginary number bi; aka Complex Conjugate |
$\overline{(a+bi)}(a + bi) = |a + bi|^2$ |
\(\overline{(a+bi)}(a + bi) = |a + bi|^2\) |
| read above as | the complex conjugate of a plus imaginary number b times a plus the imaginary number b equals the square of the absolute value of a plus the imaginary number b |
Definition in R LaTeX:$y = log_bx$ is equivalent to $x = b^y$ produces
\(y = log_bx\) is equivalent to \(x = b^{y}\)
Example in R LaTeX:$log_5 125=3$ because $5^3 = 125$ produces
\(log_5 125=3\) because \(5^3 = 125\)
Special Logarithms in R LaTeX
In $x = log_ex$ produces \(x = log_ex\) natural log$log x = log_10 x$ produces \(log x = log_{10}x\) common log
where $e = 2.718281828...$ produces \(e = 2.718281828...\)
$log_bb = 1$ produces \(log_bb = 1\)$log_b1 = 0$ produces \(log_b1 = 0\)
http://tutorial.math.lamar.edu/pdf/Algebra_Cheat_Sheet.pdf
https://www.sharelatex.com/learn/Fractions_and_Binomials http://tex.stackexchange.com/questions/47170/how-to-write-conditional-equations-with-one-sided-curly-brackets https://www.youtube.com/watch?v=iQ8_ol_tHHg - Absolute values
http://www.mathsisfun.com/numbers/complex-numbers.html
Problem: Explore exponent syntax in R
Solution: Express range of possible solutions; identifying successes and errors.$a^n a^m$ produces \(a^n a^m\)$a^n+m$ produces \(a^n+m\) error$a^{n+m}$ produces \(a^{n+m}\)
Problem: Creating pleasing display of complex expressions and formula are difficult for a beginner.
Solution: Break down the desired result into individual components; then integrate.
1 - start with simple fraction $\frac{a}{b}$ produces \(\frac{a}{b}\)
2 - add parentheses$\left(\frac{a}{b}\right)$ produces \(\left(\frac{a}{b}\right)\)
3 - create fractional numerator $\frac{\frac{a}{b}}{c}$ \(\frac{\frac{a}{b}}{c}\)
4 - add parentheses to fractional numerator $\frac{\left(\frac{a}{b}\right)}{c}$ produces \(\frac{\left(\frac{a}{b}\right)}{c}\)
Problem: R Code snippets on a single line push out remaining columns within markdown table.
Solution: Use PANDOC table format and split formulas across several lines. Note the use of blank rows. This creates a row border and also makes room for the larger size equations. Without the blank row some rows fail to display.
| R Latex Syntax | Result |
|---|---|
$\Large \left( \dfrac{a}{b} \right)^{-n}$ $= \left(\dfrac{b}{a}\right)^n$ $= \left(\dfrac{b^n}{a^n}\right)$ |
\(\Large \left( \dfrac{a}{b} \right)^{-n}\) \(= \left (\dfrac{b}{a}\right)^n\) \(= \left(\dfrac{b^n}{a^n}\right)\) |
$\Large \dfrac{a^n}{a^m} = a^{n-m}$ $= \dfrac{1}{a^{m-n}}$ |
\(\Large \dfrac{a^n}{a^m} = a^{n-m} = \dfrac{1}{a^{m-n}}\) |
$\Large a^0 = 1, a \neq 0$ |
\(\Large a^0 = 1, a \neq 0\) |
$\Large \left( \dfrac{a}{b} \right)^n$ $= \dfrac{a^n}{b^n}$ |
\(\Large \left( \dfrac{a}{b} \right)^n = \dfrac{a^n}{b^n}\) |
$\Large a^\frac{n}{m}$ $= \left(a^\frac{1}{m}\right)^n$ $= \left(a^n \right)^{\frac{1}{m}}$ |
\(\Large a^\frac{n}{m}\) \(=\left(a^\frac{1}{m}\right)^n\) \(= \left(a^n \right)^{\frac{1}{m}}\) |
Alternative Tables using PANDOC via http://stackoverflow.com/questions/26043601/how-can-i-get-pandoc-multiline-table-cells-to-work-when-outputting-to-docx
| R Header | Default Aligned | Right Aligned | Left Aligned |
|---|---|---|---|
| First | row | 12.0 | Example of a row that spans multiple lines when browser window narrowed |
| Second | row | 5.0 | Here’s another one. Note the blank line between rows. |
sessionInfo()
## R version 3.2.1 (2015-06-18)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows 8 x64 (build 9200)
##
## locale:
## [1] LC_COLLATE=English_Canada.1252 LC_CTYPE=English_Canada.1252
## [3] LC_MONETARY=English_Canada.1252 LC_NUMERIC=C
## [5] LC_TIME=English_Canada.1252
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] knitr_1.10.5
##
## loaded via a namespace (and not attached):
## [1] magrittr_1.5 formatR_1.2 tools_3.2.1 htmltools_0.2.6
## [5] yaml_2.1.13 stringi_0.5-5 rmarkdown_0.7 stringr_1.0.0
## [9] digest_0.6.8 evaluate_0.7
May you do good and not evil.
May you find forgiveness for yourself and forgive others. May you share freely, never taking more than you give.