[Tex/LaTex] Matrix equation (esp. row vectors)

formattingmatricesvertical alignment

I'd like to write the matrix equation A = (x y) B (x y)^T, where (x y)^T is written as a column vector and B is a 2×2 matrix written as such. I can (almost) do this by, for example, the following:

A = (x \ y) \begin{pmatrix} a & b \\ c & d \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix}

But I'd like the row vector (x y) to be aligned with the first row of the matrix B. How do I do this?

Best Answer

For consistency's sake, I would also use a pmatrix for the first matrix; then you can wrap the first pmatrix inside a matrix with an empty second row:



A = 
  \begin{matrix}\begin{pmatrix}x & y\end{pmatrix}\\\mbox{}\end{matrix}
  \begin{pmatrix} a & b \\ c & d \end{pmatrix} 
  \begin{pmatrix} x \\ y \end{pmatrix}


enter image description here