Qurak

Linear algebra introduction tensors and arrays

Tutorial 4 steps, run in order in one session. Every step was executed against the engine and the output below is what it produced.

Step 1
vec = {1, 2, 3}
Output
{1, 2, 3}
Step 2
Dimensions[vec]
Output
{3}
Step 3
tensor = { {{1, 2, 3, 4}, {4, 5, 6, 7}, {4, 5, 6, 7}}, {{1, 2, 3, 9}, {1, 2, 6, 5}, {1, 2, 6, 5}}}
Output
{{{1, 2, 3, 4}, {4, 5, 6, 7}, {4, 5, 6, 7}}, {{1, 2, 3, 9}, {1, 2, 6, 5}, {1, 2, 6, 5}}}
Step 4
Dimensions[tensor]
Output
{2, 3, 4}

Functions used

Related recipes

All recipes · Function reference · Use this from an MCP client