|
58 | 58 | T\left(v_1,\ldots, v_i + {v'}_i,\ldots, v_k\right)= |
59 | 59 | T\left(v_1,\ldots,v_i,\ldots,v_k\right)+ |
60 | 60 | T\left(v_1,\ldots,{v'}_i,\ldots,v_k\right),\\ |
61 | | -T\left(v_1,\ldots,av_i,\ldots,v_k\right)=aT\left(v_1,\ldots,v_i,\ldots,v_k\right) |
| 61 | +T\left(v_1,\ldots,av_i,\ldots,v_k\right)=aT\left(v_1,\ldots,v_i,\ldots,v_k\right). |
62 | 62 | $$ |
63 | 63 |
|
64 | | -A multilinear function $T\colon v^k\longrightarrow\mathbb{R}$ is |
| 64 | +A multilinear function $T\colon V^k\longrightarrow\mathbb{R}$ is |
65 | 65 | called a *$k$-tensor* on $V$ and the set of all $k$-tensors, denoted |
66 | 66 | by $\mathcal{J}^k(V)$, becomes a vector space (over $\mathbb{R}$) if |
67 | 67 | for $S,T\in\mathcal{J}^k(V)$ and $a\in\mathbb{R}$ we define |
68 | 68 |
|
69 | 69 | $$ |
70 | | -(S+T)(v_1,\ldots,v_k) = S(v_1,\ldots,v_k) + T(v_1,\ldots,v_k) |
71 | | -(aS)(v_1,\ldots,v_k) = a\cdot S(v_1,\ldots,v_k) |
| 70 | +(S+T)(v_1,\ldots,v_k) = S(v_1,\ldots,v_k) + T(v_1,\ldots,v_k)\\ |
| 71 | +(aS)(v_1,\ldots,v_k) = a\cdot S(v_1,\ldots,v_k). |
72 | 72 | $$ |
73 | 73 |
|
74 | 74 | There is also an operation connecting the various spaces |
@@ -154,4 +154,68 @@ different order. |
154 | 154 | rm(T) # tidyup |
155 | 155 | ``` |
156 | 156 |
|
| 157 | +## An explicit basis |
| 158 | + |
| 159 | + |
| 160 | +We will consider an element $X$ of $\mathcal{J}^{2}(V)$ where |
| 161 | +$V=\mathbb{R}^3$ and construct an explicit basis for it along the |
| 162 | +lines of Spivak's observation above. |
| 163 | + |
| 164 | +```{r} |
| 165 | +(X <- ktensor(spray(matrix(c(1,2,3,2,1,1),3,2),1:3))) |
| 166 | +``` |
| 167 | + |
| 168 | +Thus $X=\phi_1\otimes\phi_2 +2\phi_2\otimes\phi_1 |
| 169 | ++3\phi_3\otimes\phi_1$. Spivak asserts that $\mathcal{J}^{2}(V)$ has |
| 170 | +dimension $n^k=3^2=9$. |
| 171 | + |
| 172 | +In package idiom, for example, $\phi_2\otimes\phi_5$ would be |
| 173 | +constructed as follows: |
| 174 | + |
| 175 | +```{r} |
| 176 | +(phi2_x_phi5 <- ktensor(spray(t(c(1,3))))) |
| 177 | +``` |
| 178 | + |
| 179 | +Using this notation we can construct a basis for $\mathcal{J}^{2}(V)$ |
| 180 | +as follows: |
| 181 | + |
| 182 | +```{r} |
| 183 | +f <- function(v){ktensor(spray(t(v)))} |
| 184 | +f(c(2,5)) |
| 185 | +``` |
| 186 | + |
| 187 | +Thus `f()` creates an element of the basis set, in this case |
| 188 | +$\phi_2\otimes\phi_5$. We can construct $X$ line by line: |
| 189 | + |
| 190 | +```{r} |
| 191 | +1*f(c(1,2)) + 2*f(c(2,1)) + 3*f(c(3,1)) |
| 192 | +``` |
| 193 | + |
| 194 | +With a little effort, we can create all $3^2=9$ elements of a basis as |
| 195 | +follows: |
| 196 | + |
| 197 | +```{r} |
| 198 | +basis <- apply(expand.grid(rep(list(seq_len(3)),2)),1,f) |
| 199 | +length(basis) |
| 200 | +basis[[6]] |
| 201 | +``` |
| 202 | + |
| 203 | +Or it might be better to use ellipsis constructs to pass multiple |
| 204 | +arguments at once: |
| 205 | + |
| 206 | + |
| 207 | +```{r} |
| 208 | +s <- function(...){f(unlist(list(...)))} |
| 209 | +s(3,4,6) |
| 210 | +``` |
| 211 | + |
| 212 | +Then we could have |
| 213 | + |
| 214 | +```{r} |
| 215 | +1*s(1,2) + 2*s(2,1) + 3*s(3,1) |
| 216 | +1*s(1,2) + 2*s(2,1) + 3*s(3,1) == X |
| 217 | +``` |
| 218 | + |
| 219 | + |
| 220 | + |
157 | 221 | # References |
0 commit comments