In[]:=
a=
1
2
3
4
5
6
;b=
10
20
30
40
50
60
;​​a.b​​b.a
Out[]=
90
120
150
190
260
330
290
400
510
Out[]=

220
280
490
640

In[]:=
al=List[a];bl=List[b];
In[]:=
al.bl
Dot
:Tensors (
{1,2}
{3,4}
{5,6}
) and (
{10,20,30}
{40,50,60}
) have incompatible shapes.
Out[]=
(
{1,2}
{3,4}
{5,6}
).(
{10,20,30}
{40,50,60}
)