From 8fe4a46a853b2642fa2ec7fef4fd6c296cb112d2 Mon Sep 17 00:00:00 2001 From: mattdesl Date: Tue, 30 Jun 2015 15:40:02 -0400 Subject: [PATCH] bigger dots, specify Hadamard since multiply vec is element-wise --- README.md | 14 +++++++------- img/dotcross3.png | Bin 228 -> 266 bytes 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 4278241..dbc5803 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ For simplicity, many of the code examples here operate on floating point values - [variable name conventions](#variable-name-conventions) - [equals `=` `≈` `≠` `=:`](#equals-symbols) -- [dot & cross `·` `×`](#dot--cross) +- [dot & cross `∙` `×` `∘`](#dot--cross) - [scalar multiplication](#scalar-multiplication) - [vector multiplication](#vector-multiplication) - [dot product](#dot-product) @@ -104,7 +104,7 @@ The `≅` symbol is for [*congruence*](https://en.wikipedia.org/wiki/Congruence_ ## dot & cross -The dot `·` and cross `×` symbols have different uses depending on context. +The dot `∙` and cross `×` symbols have different uses depending on context. They might seem obvious, but it's important to understand the subtle differences before we continue into other sections. @@ -132,13 +132,13 @@ var result = 3 * k * j #### vector multiplication -To denote multiplication of one vector by another, or multiplication of a vector with a scalar, we do not use the dot `·` or cross `×` symbols. These have different meanings in linear algebra, discussed shortly. +To denote multiplication of one vector with a scalar, or element-wise multiplication of a vector with another vector, we do not use the dot `∙` or cross `×` symbols. These have different meanings in linear algebra, discussed shortly. -Let's take our earlier example but apply it to vectors: +Let's take our earlier example but apply it to vectors. For element-wise vector multiplication, you might often see an open dot `∘` to represent the [Hadamard product](https://en.wikipedia.org/wiki/Hadamard_product_%28matrices%29). ![dotcross3](img/dotcross3.png) - + Here is how it would look in code, using arrays `[x, y]` to represent the 2D vectors. @@ -164,11 +164,11 @@ function multiplyScalar(a, scalar) { } ``` -Similarly, matrix multiplication typically does not use a dot or cross symbol. Matrix multiplication will be covered in a later section. +Similarly, matrix multiplication typically does not use the dot `∙` or cross symbol `×`. Matrix multiplication will be covered in a later section. #### dot product -The dot symbol `·` can be used to denote the [*dot product*](https://en.wikipedia.org/wiki/Dot_product) of two vectors. Sometimes this is called the *scalar product* since it evaluates to a scalar. +The dot symbol `∙` can be used to denote the [*dot product*](https://en.wikipedia.org/wiki/Dot_product) of two vectors. Sometimes this is called the *scalar product* since it evaluates to a scalar. ![dotcross4](img/dotcross4.png) diff --git a/img/dotcross3.png b/img/dotcross3.png index 6e9bba719443774ee0058f68f92f37feb75aae11..eeff2ca078677797c0b5b83119606bccdf30b661 100644 GIT binary patch delta 209 zcmV;?051RJ0g3_#M@dFFIbkZ12Sa}<01p5F1h)_XAqEk$rQoFhU>FXG0u&fv1S!Lb za4b2&0UU^z5YpPozz<_!0IgEKpfXm-^-~=cRgyQojK!~e62_YL= za6ya2Vtli~x)Qv{tp^YiPY*N$F?xLfe13Bh1py2y0SOubY$1jsd@d$x0Z&0WZV6`} z4QYOrABhEG1_^|aP6AX_R|u!5ZvX=Y7Ml$;2{{8(51UJSxW>sI4JK}-%E=oB!o|?W L3J3=d7!d$F_&`Gy delta 171 zcmV;c095~q0^|V)M@dFFIbj)*2Sa}u01p5F1d$K`AqEk$rQoFhL!tl$1{i_Ka9`^L z2XG)>LP%)Wddy(7C{u1n{1j+77N8MOh5|@{;z0N%bpnJ{vVgW0iN#eG`+8f1MDp<( z?7B39SW*ZuPJx6b&@dxbBN7AwNi