Is there a way to dot two vectors that are included in a list? Let's say I have two lists that contain a couple of vectors
list1 = {{1,2,3},{2,4,6},{1,5,7}}
list2 = {{4,1,9},{1,4,3},{2,8,3}}
and I would like to take the dot product between each of the vectors and give out the result in a new list. This function function[list1,list2]
would then do something like
{{1,2,3}.{4,1,9},{2,4,6}.{1,4,3},{1,5,7}.{2,8,3}}
(*
{33, 36, 63}
*)
MapThread[Dot, {list1, list2}, 1]
$\endgroup$Dot @@@ Transpose[{list1, list2}]
. $\endgroup$