# Tag Info

5

This is very short: vec = {a[1], a[2], a[1] + 2 a[2] - a[3]}; Transpose[D[vec, {Array[a, 3]}]] (* ==> {{1, 0, 1}, {0, 1, 2}, {0, 0, -1}} *) It gets the basis from the columns of the Jacobian for the linear relation in vec.

5

CoefficientArrays[] does nicely for this: CoefficientArrays[{a[1], a[2], a[1] + 2 a[2] - a[3]}, Array[a, 3]] // Normal // Last // Transpose {{1, 0, 1}, {0, 1, 2}, {0, 0, -1}}

3

Try something like this: Map[Coefficient[{a[1], a[2], a[1] + 2 a[2] - a[3]}, #] &, Table[a[i], {i, 3}]] (*{{1, 0, 1}, {0, 1, 2}, {0, 0, -1}}*)

3

Your operation does not work because in this case it is not a matricial multiplication but a composition. Try mM = {{D[#, x] &, D[#, y] &}, {D[#, y] &, D[#, z] &}} v = {f[x, y, z], g[x, y, z]} apply[a_, b_] := Inner[#1[#2] &, a, b] This answer come from the article http://www.mathematica-journal.com/issue/v8i4/tricks/contents/...

0

As shown in How to plot vectors in Mathematica, the desired graphics primitive is Arrow with a list of two vectors, one the origin and one the head of the vector. If A is your matrix, this expression builds the list of Arrow primitives. In[1]:= A=Array[a,{2,3}]; Map[Arrow, Transpose[{0 A, A}, {2, 3, 1}]] Out[2]:= {Arrow[{{0, 0}, {a[1, 1], a[2, 1]...

1

I don't consider the following terribly complicated, but you might hopefully pick something up from this: Graphics3D[{{Red, MapThread[{Text[Style[#2, Large, Bold], #1, {0, -1}], Arrow[Tube[{{0, 0, 0}, #1}]]} &, {IdentityMatrix[3], {"x", "y", "z"}}]}, With[{tr = Composition[...

Top 50 recent answers are included