Graphics, Figures & Tablesmatrices

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
zakir
Posts: 1
Joined: Mon Sep 04, 2017 11:21 pm

matrices

Post by zakir »

Hi

I need help regarding below matrices which I want to keep in one row. Can any one help me please?

Code: Select all

\begin{equation*}
\left[ \begin{array}{ccccccc}
  0         &       0      &      0     &     1     &     0     &     0      &     0 \\ 
	d         &       0      &      0     &     0     &     d     &     0      &     0 \\ 
	0         &       d      &      0     &     0     &     0     &     d      &     0 \\ 
	0         &       0      &      d     &     0     &     0     &     0      &     d \\
 (a_{2})_1  &       0      &      0     & (a_{3})_1 & (a_{1})_1 &     0      &     0 \\
  0         & (b_{2})_1    &      0     & (b_{3})_1 &     0     & (b_{1})_1  &     0 \\ 
	0         &       0      &  (c_{2})_1 & (c_{3})_1 &     0     &     0      & (c_{1})_1 
\end{array} \right]
\left[ \begin{array}{c}
  \delta^{*}v_{0}\\ 
	\delta^{*}t_{0}\\  
	\delta^{*}p_{0}\\  
	\delta^{*}f_{1}\\ 
 \delta^{*}v_{1}\\ 
 \delta^{*}t_{1}\\  
 \delta^{*}p_{1}\\    
\end{array} \right] +
\end{equation*}
\begin{equation*}
\left[ \begin{array}{ccccccc}
  d         &       0      &      0     &     0     &     0     &     0      &     0 \\ 
	1         &       0      &      0     &     0     &     0     &     0      &     0 \\ 
	0         &       1      &      0     &     0     &     0     &     0      &     0 \\ 
  0         &       0      &      1     &     0     &     0     &     0      &     0 \\
 (a_{5})_{1}&       0      &      0     &     0     &     0     &     0      &     0 \\
  0         &       0      &      0     &     0     &     0     &     0      &     0 \\ 
	0         &       0      &  (c_{5})_1 &     0     &     0     &     0      &     0 
\end{array} \right]
\left[ \begin{array}{c}
 \delta^{*}u_{1}\\ 
	\delta^{*}s_{1}\\  
	\delta^{*}g_{1}\\  
	\delta^{*}f_{2}\\ 
 \delta^{*}v_{2}\\ 
 \delta^{*}t_{2}\\  
 \delta^{*}p_{2}\\ 
\end{array} \right] = 

\left[ \begin{array}{c}
 (r_{1})_{1}\\ 
 (r_{2})_{1}\\ 
 (r_{3})_{1}\\ 
 (r_{4})_{1}\\
 (r_{5})_{1}\\
 (r_{6})_{1}\\ 
 (r_{7})_{1}   
\end{array} \right]
\end{equation*}

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

mas
Posts: 226
Joined: Thu Dec 04, 2008 4:39 am

matrices

Post by mas »

Whenever you seek help, please post a complete, compilable code. Have a look at Infominimal working example.

I would suggest that you use matrix environment provided by mathtools package. As it is, it is not possible to get everything on a single row. You can change the font size, to make it fit within the margins of your document. I have given the code I used to get it (with about 11pt overfull hbox)

Code: Select all

%
\documentclass[x11names,svgnames,11pt]{article}
%
\usepackage[body={15cm,23cm},headheight=15.2pt,centering]{geometry}
\usepackage{mathtools} 

\begin{document}
\scriptsize`
\begin{equation*}
\begin{bmatrix}
  0         & 0         & 0         & 1         & 0         & 0         & 0 \\
  d         & 0         & 0         & 0         & d         & 0         & 0 \\
  0         & d         & 0         & 0         & 0         & d         & 0 \\
  0         & 0         & d         & 0         & 0         & 0         & d \\
  (a_{2})_1 & 0         & 0         & (a_{3})_1 & (a_{1})_1 & 0         & 0 \\
  0         & (b_{2})_1 & 0         & (b_{3})_1 & 0         & (b_{1})_1 & 0 \\
  0         & 0         & (c_{2})_1 & (c_{3})_1 & 0         & 0         & (c_{1})_1
\end{bmatrix}
%
\begin{bmatrix}
  \delta^{*}v_{0}\\
  \delta^{*}t_{0}\\
  \delta^{*}p_{0}\\
  \delta^{*}f_{1}\\
  \delta^{*}v_{1}\\
  \delta^{*}t_{1}\\
  \delta^{*}p_{1}\\
\end{bmatrix}
%
\begin{bmatrix}
  d           & 0 & 0         & 0 & 0 & 0 & 0 \\
  1           & 0 & 0         & 0 & 0 & 0 & 0 \\
  0           & 1 & 0         & 0 & 0 & 0 & 0 \\
  0           & 0 & 1         & 0 & 0 & 0 & 0 \\
  (a_{5})_{1} & 0 & 0         & 0 & 0 & 0 & 0 \\
  0           & 0 & 0         & 0 & 0 & 0 & 0 \\
  0           & 0 & (c_{5})_1 & 0 & 0 & 0 & 0
\end{bmatrix}
%
\begin{bmatrix}
  \delta^{*}u_{1}\\
  \delta^{*}s_{1}\\
  \delta^{*}g_{1}\\
  \delta^{*}f_{2}\\
  \delta^{*}v_{2}\\
  \delta^{*}t_{2}\\
  \delta^{*}p_{2}\\
\end{bmatrix}
=
%
\begin{bmatrix}
  (r_{1})_{1}\\
  (r_{2})_{1}\\
  (r_{3})_{1}\\
  (r_{4})_{1}\\
  (r_{5})_{1}\\
  (r_{6})_{1}\\
  (r_{7})_{1}
\end{bmatrix}
\end{equation*}

\end{document}
It looks like this:
x.png
x.png (14.15 KiB) Viewed 1524 times
Hope that helps.

OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim
Post Reply