If X is a vector of numel(X) = 6, then
if A,B are constants; otherwise it depends on what they are and what is the end result wanted...if they're both also vectors of same shape as X, then
for element-wise multiplication. From the Q? it doesn't sound like you want/intend matrix multiplication, but that's doable, too, if that were to the desired result and have commensurately-sized Arrays/Vectors for conformant product dimensions.