Math & Sciencematrix/vector algebra

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
pottertl
Posts: 7
Joined: Wed Jan 05, 2011 10:33 pm

matrix/vector algebra

Post by pottertl »

I need to write a matrix/vector equation of the form

[matrix]*[vector]=[vector]

All on the same line. Is there a relatively simple way to do this?

Thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

matrix/vector algebra

Post by localghost »

This is described in every book about LaTeX basics [1].

Code: Select all

\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}  % loads »amsmath«

\begin{document}
  \begin{equation}\label{eq:matrixeqn}
    \begin{pmatrix}
      m_{11} & m_{12} & m_{13} \\
      m_{21} & m_{22} & m_{23} \\
      m_{31} & m_{32} & m_{33}
    \end{pmatrix}
    \cdot
    \begin{pmatrix}
      v_{11} \\
      v_{21} \\
      v_{31}
    \end{pmatrix}
    =
    \begin{pmatrix}
      r_{11} \\
      r_{21} \\
      r_{31}
    \end{pmatrix}
  \end{equation}
\end{document}
Refer additionally to the »Math mode« document.

[1] View topic: LaTeX Resources for Beginners


Thorsten
Post Reply