Using Fold
:
A = Array[Subscript[b, ##] &, {2, 2}];
X = {{a, b}, {x, y}};
Fold[Dot[#1, Transpose@#2] &, X, {A}] === {A . {a, b}, A . {x, y}}
(*True*)
To prevent matrix multiplication if the dimensions are not proper (as pointed out Syed), you can build your own dot product as follows:
MyDot[A_?MatrixQ, vecs_?MatrixQ] /; SameQ[Last@Dimensions[A],
Mean@(Length[#] & /@ vecs)] :=
Fold[Dot[#1, Transpose@#2] &, vecs, {A}]
Test 1:
MyDot[A, X] === {A . {a, b}, A . {x, y}}
(*True*)
Test 2:
X2 = {{a, b, c}, {x, y}};
MyDot[A, X2]
(*MyDot[{{Subscript[b, 1, 1], Subscript[b, 1, 2]}, {Subscript[b, 2, 1], Subscript[b, 2, 2]}}, {{a, b, c}, {x, y}}]*)
Transpose[A . Transpose[x]]
$\endgroup$x={{a,b},{x,y}}
toxx={{a,b},{x,y}}
andA.#&/@xx
works. $\endgroup$Dot
orPlus
to any two-argument action. $\endgroup$