3

Why is this code not working and how can I get it to work? I would like to multiply one row vector with a column vector. Here is what I've tried:

\begin{equation}

    {\begin{bmatrix}
        1 & x & y
    \end{bmatrix}}

    {\begin{bmatrix}
        \alpha_1 \\ \alpha_2 \\ \alpha_3
    \end{bmatrix}}
\end{equation}

Appreciate the help!

2
  • 1
    Welcome to TeX.SE!
    – Mensch
    Commented May 13, 2023 at 15:35
  • 2
    Welcome to tex.sx. There are several problems. Most important, blank lines aren't allowed in math; if you want some visual space in the input, put a % at the beginning of that line. Also, the extra braces aren't needed around the bmatrix environments. Finally, it's not so important here, but the LaTeX syntax recommends braces around subscripts; that is, \alpha_{1}; This is essential for subscript values that aren't single characters. Commented May 13, 2023 at 15:35

2 Answers 2

8

No blank lines are allowed inside the code for a math display. The outer braces are redundant.

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation}
  \begin{bmatrix}
  1 & x & y
  \end{bmatrix}
  \begin{bmatrix}
  \alpha_{1} \\ \alpha_{2} \\ \alpha_{3}
  \end{bmatrix}
\end{equation}

\end{document}

enter image description here

3

This MWE to have the same thickness between the two matrices using the package mtpro2 version lite.

\documentclass{article}
\usepackage{amsmath}
\usepackage[lite]{mtpro2}
\begin{document}

\[
\begin{bmatrix} 1 & x & y  \end{bmatrix}
\begin{bmatrix} \alpha_{1} \\ \alpha_{2} \\ \alpha_{3} \end{bmatrix} 
= 0.
\]

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .