| 1 |
\documentclass{article} |
| 2 |
\usepackage{tensorstyles} |
| 3 |
\tensorsset{\tensor}[preset=math, preset*=einstein] |
| 4 |
|
| 5 |
|
| 6 |
\usepackage{keytheorems} % SETUP |
| 7 |
|
| 8 |
% Plain style: corollary, lemma, conjecture |
| 9 |
\newkeytheorem{corollary}[name=Corollary, style=plain] |
| 10 |
\newkeytheorem{lemma}[name=Lemma, style=plain] |
| 11 |
\newkeytheorem{conjecture}[name=Conjecture, style=plain] |
| 12 |
|
| 13 |
% Break style: theorem |
| 14 |
\newkeytheorem{theorem}[name=Theorem, style=plain] |
| 15 |
\newkeytheorem{paradox}[name=Paradox, style=plain] |
| 16 |
%\newkeytheorem{proof}[name=Proof, style=break] |
| 17 |
|
| 18 |
% Definition style: property, proposition, contraposition, consequence, hypothesis |
| 19 |
\newkeytheorem{property}[name=Property, style=definition] |
| 20 |
\newkeytheorem{proposition}[name=Proposition, style=definition] |
| 21 |
\newkeytheorem{contraposition}[name=Contraposition, style=definition] |
| 22 |
\newkeytheorem{consequence}[name=Consequence, style=definition] |
| 23 |
\newkeytheorem{hypothesis}[name=Hypothesis, style=definition] |
| 24 |
|
| 25 |
% Defbreak style: Definition, reminder |
| 26 |
\newkeytheorem{definition}[name=Definition, style=definition] |
| 27 |
\newkeytheorem{reminder}[name=Reminder, style=definition] |
| 28 |
|
| 29 |
% Remark style: remark, example, counterexample, exercise |
| 30 |
\newkeytheorem{remark}[name=Remark, style=remark] |
| 31 |
\newkeytheorem{example}[name=Example, style=remark] |
| 32 |
\newkeytheorem{counterexample}[name=CounterExample, style=remark] |
| 33 |
|
| 34 |
|
| 35 |
\begin{document} |
| 36 |
|
| 37 |
% https://grinfeld.org/books/An-Introduction-To-Tensor-Calculus/Chapter7.html |
| 38 |
|
| 39 |
% https://www.underleaf.ai/learn/latex/tensors |
| 40 |
|
| 41 |
% https://rodolphe-vaillant.fr/images/tmp/cours_tenseurs_ups.pdf |
| 42 |
|
| 43 |
Tensors are mathematical objects that generalize scalars, vectors, and matrices to higher dimensions. |
| 44 |
\LaTeX{} provides excellent support for typesetting tensor notation, which is essential in physics, engineering, and advanced mathematics. |
| 45 |
This guide covers the essential \LaTeX{} commands for working with tensors. |
| 46 |
|
| 47 |
\section{Basic notion} |
| 48 |
|
| 49 |
\begin{definition} |
| 50 |
Let $V$ be a $\mathbb{K}$-vectorial space. |
| 51 |
A form (or linear map) on $V$ is an application from $V$ to $\mathbb{K}$. |
| 52 |
For a vector space $V$, that we note $EV*$ it's dual space, which is the vector space of it's linear map on $V$. |
| 53 |
\end{definition} |
| 54 |
|
| 55 |
\begin{definition} |
| 56 |
A tensor of order $(p,q)$, noted $T$, is a multi-linear map defined as |
| 57 |
\begin{equation} |
| 58 |
T: \underbrace {V^{*}\times \dots \times V^{*}} _{p{\text{ copies}}}\times \underbrace {V\times \dots \times V} _{q{\text{ copies}}}\rightarrow \mathbb{K} |
| 59 |
\end{equation} |
| 60 |
\end{definition} |
| 61 |
|
| 62 |
\begin{remark} |
| 63 |
By applying a multi-linear map $T$ of type $(p, q)$ to a basis ${e_j}$ for $V$ and a canonical co-basis ${\varepsilon_i}$ for $V^*$, |
| 64 |
\begin{equation} |
| 65 |
\tensor[preset=einstein, collapsed-indices=true]{xX}{T}[_{j_{1}\ldots j_{q}}^{i_{1}\ldots i_{p}}] |
| 66 |
\equiv |
| 67 |
T\left({\boldsymbol {\varepsilon }}^{i_{1}},\ldots ,{\boldsymbol {\varepsilon }}^{i_{p}},\mathbf{e}_{j_{1}},\ldots ,\mathbf{e}_{j_{q}}\right), |
| 68 |
\end{equation} |
| 69 |
a $(p + q)$-dimensional array of components can be obtained. |
| 70 |
\end{remark} |
| 71 |
|
| 72 |
% Basic Tensor Notation |
| 73 |
|
| 74 |
% Tensors are typically represented using indices to denote their components: |
| 75 |
|
| 76 |
% Tensor Symbols |
| 77 |
|
| 78 |
% T, \mathbf{T}, \mathsf{T}, \mathcal{T}, \mathbb{T} |
| 79 |
% T,T,T,T,T |
| 80 |
% T,T,T,T,T |
| 81 |
|
| 82 |
% Different ways to represent tensor symbols in LaTeX. |
| 83 |
|
| 84 |
% Tensor Components with Indices |
| 85 |
|
| 86 |
% T^{i}_{j}, \quad T^{ij}_{k}, \quad T^{i_1 i_2 \ldots i_n}_{j_1 j_2 \ldots j_m} |
| 87 |
% Tji,Tkij,Tj1j2…jmi1i2…in |
| 88 |
% Tji,Tkij,Tj1j2…jmi1i2…in |
| 89 |
|
| 90 |
% Tensor components with superscript (contravariant) and subscript (covariant) indices. |
| 91 |
|
| 92 |
% Tensor Rank |
| 93 |
|
| 94 |
% \text{Rank } (m,n) \text{ tensor: } T^{i_1 i_2 \ldots i_m}_{j_1 j_2 \ldots j_n} |
| 95 |
% Rank (m,n) tensor: Tj1j2…jni1i2…im |
| 96 |
% Rank (m,n) tensor: Tj1j2…jni1i2…im |
| 97 |
|
| 98 |
% A tensor of rank (m,n) has m contravariant indices and n covariant indices. |
| 99 |
|
| 100 |
% Einstein Summation Convention |
| 101 |
|
| 102 |
% The Einstein summation convention is commonly used with tensors, where repeated indices imply summation: |
| 103 |
|
| 104 |
% Implicit Summation |
| 105 |
|
| 106 |
% A^i B_i = \sum_{i=1}^n A^i B_i |
| 107 |
% AiBi=∑i=1nAiBi |
| 108 |
% AiBi=i=1∑nAiBi |
| 109 |
|
| 110 |
% When an index appears once as a superscript and once as a subscript, summation is implied. |
| 111 |
|
| 112 |
% Matrix Multiplication as Tensor Contraction |
| 113 |
|
| 114 |
% C^i_j = A^i_k B^k_j = \sum_{k=1}^n A^i_k B^k_j |
| 115 |
% Cji=AkiBjk=∑k=1nAkiBjk |
| 116 |
% Cji=AkiBjk=k=1∑nAkiBjk |
| 117 |
|
| 118 |
% Matrix multiplication expressed as tensor contraction using Einstein notation. |
| 119 |
|
| 120 |
% Free Indices |
| 121 |
|
| 122 |
% D^{ij}_k = A^i_l B^j_m C^{lm}_k |
| 123 |
% Dkij=AliBmjCklm |
| 124 |
% Dkij=AliBmjCklm |
| 125 |
|
| 126 |
% Indices that appear only once (i, j, k) are free indices and represent components of the resulting tensor. |
| 127 |
|
| 128 |
% Common Tensors in Physics |
| 129 |
|
| 130 |
% Metric Tensor |
| 131 |
|
| 132 |
% g_{\mu\nu} = \begin{pmatrix} -1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix} |
| 133 |
% gμν=(−1000010000100001) |
| 134 |
% gμν= |
| 135 |
% −1000010000100001 |
| 136 |
% |
| 137 |
|
| 138 |
% The Minkowski metric tensor used in special relativity. |
| 139 |
|
| 140 |
% Kronecker Delta |
| 141 |
|
| 142 |
% \delta^i_j = \begin{cases} 1 & \text{if } i = j \\ 0 & \text{if } i \neq j \end{cases} |
| 143 |
% δji={1if i=j0if i≠j |
| 144 |
% δji={10if i=jif i=j |
| 145 |
|
| 146 |
% The Kronecker delta is a rank (1,1) tensor that acts as an identity operator. |
| 147 |
|
| 148 |
% Levi-Civita Symbol |
| 149 |
|
| 150 |
% \varepsilon_{ijk} = \begin{cases} +1 & \text{if } (i,j,k) \text{ is an even permutation of } (1,2,3) \\ -1 & \text{if } (i,j,k) \text{ is an odd permutation of } (1,2,3) \\ 0 & \text{if any index is repeated} \end{cases} |
| 151 |
% εijk={+1if (i,j,k) is an even permutation of (1,2,3)−1if (i,j,k) is an odd permutation of (1,2,3)0if any index is repeated |
| 152 |
% εijk=⎩ |
| 153 |
% ⎨ |
| 154 |
% ⎧+1−10if (i,j,k) is an even permutation of (1,2,3)if (i,j,k) is an odd permutation of (1,2,3)if any index is repeated |
| 155 |
|
| 156 |
% The Levi-Civita symbol is used for cross products and determinants. |
| 157 |
|
| 158 |
% Tensor Operations |
| 159 |
|
| 160 |
% Tensor Addition |
| 161 |
|
| 162 |
% C^{ij}_k = A^{ij}_k + B^{ij}_k |
| 163 |
% Ckij=Akij+Bkij |
| 164 |
% Ckij=Akij+Bkij |
| 165 |
|
| 166 |
% Tensors of the same rank can be added component-wise. |
| 167 |
|
| 168 |
% Tensor Contraction |
| 169 |
|
| 170 |
% A^i_i = \sum_{i=1}^n A^i_i |
| 171 |
% Aii=∑i=1nAii |
| 172 |
% Aii=i=1∑nAii |
| 173 |
|
| 174 |
% Contraction of a tensor by setting a contravariant and covariant index equal. |
| 175 |
|
| 176 |
% Tensor Product |
| 177 |
|
| 178 |
% C^{ij}_{kl} = A^i_k \otimes B^j_l |
| 179 |
% Cklij=Aki⊗Blj |
| 180 |
% Cklij=Aki⊗Blj |
| 181 |
|
| 182 |
% The tensor product combines two tensors into a higher-rank tensor. |
| 183 |
|
| 184 |
% Raising and Lowering Indices |
| 185 |
|
| 186 |
% The metric tensor can be used to raise or lower indices: |
| 187 |
|
| 188 |
% Raising an Index |
| 189 |
|
| 190 |
% A^{\mu} = g^{\mu\nu}A_{\nu} |
| 191 |
% Aμ=gμνAν |
| 192 |
% Aμ=gμνAν |
| 193 |
|
| 194 |
% Using the inverse metric tensor to raise an index. |
| 195 |
|
| 196 |
% Lowering an Index |
| 197 |
|
| 198 |
% A_{\mu} = g_{\mu\nu}A^{\nu} |
| 199 |
% Aμ=gμνAν |
| 200 |
% Aμ=gμνAν |
| 201 |
|
| 202 |
% Using the metric tensor to lower an index. |
| 203 |
|
| 204 |
% Covariant Derivatives |
| 205 |
|
| 206 |
% Christoffel Symbols |
| 207 |
|
| 208 |
% \Gamma^{\lambda}_{\mu\nu} = \frac{1}{2}g^{\lambda\rho}\left(\frac{\partial g_{\rho\mu}}{\partial x^{\nu}} + \frac{\partial g_{\rho\nu}}{\partial x^{\mu}} - \frac{\partial g_{\mu\nu}}{\partial x^{\rho}}\right) |
| 209 |
% Γμνλ=12gλρ(∂gρμ∂xν+∂gρν∂xμ−∂gμν∂xρ) |
| 210 |
% Γμνλ=21gλρ(∂xν∂gρμ+∂xμ∂gρν−∂xρ∂gμν) |
| 211 |
|
| 212 |
% Covariant Derivative of a Vector |
| 213 |
|
| 214 |
% \nabla_{\mu}V^{\nu} = \partial_{\mu}V^{\nu} + \Gamma^{\nu}_{\mu\lambda}V^{\lambda} |
| 215 |
% ∇μVν=∂μVν+ΓμλνVλ |
| 216 |
% ∇μVν=∂μVν+ΓμλνVλ |
| 217 |
|
| 218 |
% The covariant derivative generalizes the partial derivative to curved spaces. |
| 219 |
|
| 220 |
% Covariant Derivative of a Covector |
| 221 |
|
| 222 |
% \nabla_{\mu}V_{\nu} = \partial_{\mu}V_{\nu} - \Gamma^{\lambda}_{\mu\nu}V_{\lambda} |
| 223 |
% ∇μVν=∂μVν−ΓμνλVλ |
| 224 |
% ∇μVν=∂μVν−ΓμνλVλ |
| 225 |
|
| 226 |
% Advanced Tensor Notation |
| 227 |
|
| 228 |
% R^{\rho}_{\sigma\mu\nu} = \partial_{\mu}\Gamma^{\rho}_{\nu\sigma} - \partial_{\nu}\Gamma^{\rho}_{\mu\sigma} + \Gamma^{\rho}_{\mu\lambda}\Gamma^{\lambda}_{\nu\sigma} - \Gamma^{\rho}_{\nu\lambda}\Gamma^{\lambda}_{\mu\sigma} |
| 229 |
% Rσμνρ=∂μΓνσρ−∂νΓμσρ+ΓμλρΓνσλ−ΓνλρΓμσλ |
| 230 |
% Rσμνρ=∂μΓνσρ−∂νΓμσρ+ΓμλρΓνσλ−ΓνλρΓμσλ |
| 231 |
|
| 232 |
% The Riemann curvature tensor. |
| 233 |
|
| 234 |
% R_{\mu\nu} = R^{\lambda}_{\mu\lambda\nu} |
| 235 |
% Rμν=Rμλνλ |
| 236 |
% Rμν=Rμλνλ |
| 237 |
|
| 238 |
% The Ricci tensor, a contraction of the Riemann tensor. |
| 239 |
|
| 240 |
% R = g^{\mu\nu}R_{\mu\nu} |
| 241 |
% R=gμνRμν |
| 242 |
% R=gμνRμν |
| 243 |
|
| 244 |
% The Ricci scalar, a contraction of the Ricci tensor. |
| 245 |
|
| 246 |
% G_{\mu\nu} = R_{\mu\nu} - \frac{1}{2}g_{\mu\nu}R |
| 247 |
% Gμν=Rμν−12gμνR |
| 248 |
% Gμν=Rμν−21gμνR |
| 249 |
|
| 250 |
% The Einstein tensor, used in general relativity. |
| 251 |
|
| 252 |
|
| 253 |
|
| 254 |
\end{document} |