-
Notifications
You must be signed in to change notification settings - Fork 1
/
matematica.Rmd
54 lines (35 loc) · 2.4 KB
/
matematica.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
---
title: "Apuntes de matemática"
output:
html_document:
toc: true
toc_float: true
theme: sandstone
knit: (function(input, ...) {
rmarkdown::render(input, output_dir="docs")
})
---
Álgebra
-------
### Cambio de base
Dada una base canónica $B = [\mathbf{b_1},\mathbf{b_2},..,\mathbf{b_n}]$ y otra base $C = [\mathbf{c_1},\mathbf{c_2},..,\mathbf{c_n}]$ expresada en la base canónica, podemos "traducir" un vector $\mathbf{v_b}$ expresado en $B$ a un vector $\mathbf{v_c}$ expresado en $C$ mediante
$$ \mathbf{v_c} = C^{-1}\mathbf{v_b} $$
mientras que podemos hacer la operación inversa con
$$ \mathbf{v_b} = C\mathbf{v_c} $$
Referencia: [3Blue1Brown](https://www.youtube.com/watch?v=P2LTAUO1TdA)
### Proyecciones
- La **proyección escalar** $\alpha$ de un vector $\mathbf{a}$ sobre un vector $\mathbf{b}$ se computa como
$$ \alpha = \frac{\mathbf{a} \cdot \mathbf{b}}{ {\lVert}\mathbf{b}{\rVert} } $$
- La **proyección vectorial** $\mathbf{p}$ de un vector $\mathbf{a}$ sobre un vector $\mathbf{b}$ se computa como
$$ \mathbf{p} = \frac{\mathbf{a} \cdot \mathbf{b}}{ {\lVert}\mathbf{b}{\rVert}^2 } \mathbf{b} = \frac{\mathbf{a} \cdot \mathbf{b}}{ {\lVert}\mathbf{b}{\rVert} } \frac{\mathbf{b}}{ {\lVert}\mathbf{b}{\rVert} } $$
$\alpha$ es un escalar que representa la longitud de la proyección vectorial de $\mathbf{a}$ sobre $\mathbf{b}$ -- si estos vectores apuntan "en la misma dirección" (el ángulo entre ellos es menor a 90º) $\alpha$ es un número positivo, si apuntan "en direcciones opuestas" (ángulo entre 90º y 180º) es un número negativo y si son perpendiculares (ángulo igual a 90º) es igual a cero.
$\mathbf{b} / \lVert\mathbf{b}\rVert$ es el vector unitario de $\mathbf{b}$, es decir, normalizado para que tenga longitud igual a uno.
La proyección vectorial de $\mathbf{a}$ sobre $\mathbf{b}$ es un vector con la misma dirección que $\mathbf{b}$ y con una magnitud dada por $\alpha$.
Referencia: [Wikipedia](https://en.wikipedia.org/wiki/Vector_projection)
### Rotación
En un espacio de dos dimensiones, una matriz de rotación $R$ que hace un cambio desde la base canónica hacia una base rotada en un ángulo $\theta$ en el sentido contrario a las agujas del reloj está dada por
$$ R(\theta) = \begin{bmatrix}
\cos\theta & -\sin\theta \\
\sin\theta & \cos\theta
\end{bmatrix} $$
Fuente: [Mathematics for Machine Learning](https://mml-book.github.io/book/mml-book.pdf)