I have some vectors such as :
a={{0}, {0}, {0}};
b={{1}, {1}, {1}};
c={{1}, {1}, {0}};
I wanted to product a by a with the result 1, also the product of b and b must be 1, but the product of c and b (c and a) must yield 0, and so on. As a matter of fact, the desire result is as Kronecker delta, but I do not know how I can define a function with this characterization.
However, Jens' answer how-to-define-an-orthogonal-basis-in-the-right-way could help, but it is different in details, because, in my calculation any vector does not have a specified name same as x, y, z. In my large calculation, any vector acts with their component in any iteration and they do not have a name in every time. For example in how-to-define-an-orthogonal-basis-in-the-right-way output you can write:
tensorExpand[Dot[x, y]]
0
tensorExpand[Dot[x, x]]
1
But directly:
tensorExpand[Dot[{{1}, {1}, {1}}, {{0}, {0}, {0}}]]
can't manipulate.
Dotis no good? – BlacKow Jun 09 '15 at 19:25SameQ? – BlacKow Jun 09 '15 at 19:36delta[v1_, v2_] := Times @@ MapThread[Boole[Equal[##]] &, {v1, v2}]. I am not sure I understand the question. – chuy Jun 09 '15 at 19:43delta[v1_, v2_] := Boole[Equal[v1, v2]]... – chuy Jun 09 '15 at 19:46