[Tex/LaTex] Multiplication of vector and matrix

matrices

I want to show multiplication between this matrix:

z^{[1]} = \[
\left[
  \begin{array}{ccc}
    \horzbar & w^{T}_{1} & \horzbar \\
    \horzbar & w^{T}_{2} & \horzbar \\
    \horzbar & w^{T}_{3} & \horzbar \\
    \horzbar & w^{T}_{4} & \horzbar \\
  \end{array}
\right]

and this vector:

[\  
\begin{align}
    y &= \begin{bmatrix}
           x_{1} \\
           x_{2} \\
           \vdots \\
           x_{m}
         \end{bmatrix}
\end{align}

\]

But how can I show the matrix-vector multiplication?

Best Answer

Following the probable definition from How do I typeset vertical and horizontal lines inside a matrix?

\documentclass{article}
\usepackage{amsmath,array}
\newcommand*{\vertbar}{\rule[-1ex]{0.5pt}{2.5ex}}
\newcommand*{\horzbar}{\rule[.5ex]{2.5ex}{0.5pt}}
\begin{document}
\[
z^{[1]} = 
\left[
  \begin{array}{ccc}
    \horzbar & w^{T}_{1} & \horzbar \\
    \horzbar & w^{T}_{2} & \horzbar \\
    \horzbar & w^{T}_{3} & \horzbar \\
    \horzbar & w^{T}_{4} & \horzbar \\  
  \end{array}
\right]
\begin{bmatrix}
           x_{1} \\
           x_{2} \\
           \vdots \\
           x_{m}
         \end{bmatrix}
\]
\end{document}

enter image description here

Related Question