13
votes
3answers
369 views

Force latex to show a square matrix as square

How can i force latex to print out square matrix as a square matrix with equal width and height in math-mode? I also read amsmath documentation, but don't found any useful help on it. For example ...
3
votes
1answer
71 views

bmatrix no new row [closed]

I use: \[ M= \begin{bmatrix} 1 & 2 & 3 & 4 & 5\\ 3 & 4 & 5 & 6 & 7\\ \end{bmatrix} \] and as a result i have only one row. 1 is combined with 3, 2 with ...
3
votes
2answers
87 views

is it possible to add dashed lines between rows/column of pmatrix from amsmath?

I wish these packages from amsmath have more options! Is there a way to add a macro to add dashed lines between rows and columns for a matrix typeset using pmatrix? Similar to what is being asked ...
4
votes
2answers
219 views

Help me input a column vector

I'm trying to input an arrow vector (a column vector, see the picture) in an align environment, but it reports an error. Can someone show me the TeX code of it in an align environment?
5
votes
1answer
48 views

Using a macro with ifx inside of a bmatrix

The following code does not compile if I don't have the extra braces around the entries of the matrix, and I don't know why. Can I modify \switcher to obviate the need for these extra braces? ...
6
votes
1answer
120 views

Gauss package: gmatrix not equivalent to corresponding amsmath environment

The following quote is taken from the gauss package documentation: The package defines a new matrix environment gmatrix which behaves just like Latex's and AMS-Latex's matrix. But when using ...
3
votes
2answers
72 views

\newcommand for bmatrix of features using pgffor throws missing \endgroup error

There are two parts to this question. Mainly, I'm interested in implementing a \newcommand that can take an arbitrary number of arguments to be set in a single column of a matrix. I tried the ...
6
votes
4answers
179 views

Multiple underbraces that span overlapping columns in matrix

I want to display the structure of a matrix as shown in the image below: The following code shows the structure of the matrix, without the underbraces: \documentclass{standalone} ...
9
votes
3answers
722 views

Underbrace in a matrix

I want to display the structure of a matrix as shown in the image below: Can this be done using pmatrix and \underbrace? My attempt at combining pmatrix and \underbrace results in a compile error. ...
4
votes
2answers
141 views

equations inside matrix/array — aligning on charater

Suppose I have a system of equations I'd like to present as a vector. Using amsmath, something like \begin{equation} \begin{pmatrix} (2)(2)+(-1)(-3) \\ (4)(2)+(3)(-3) \end{pmatrix} \end{equation} ...
5
votes
1answer
108 views

Automatic way to match matrix heights

I have a simple matrix equation, but one of the matrices has subscripts and superscripts on both lines: \documentclass{article} \usepackage{lmodern} \usepackage[T1]{fontenc} ...
3
votes
1answer
157 views

Matrix environments not working

I have a strange problem. It seems I cannot use any of the matrix environments (matrix, bmatrix, pmatrix etc.). The following code will not render on my machine \documentclass[12pt]{article} ...
20
votes
5answers
2k views

Huge matrix in my document. Possible ways to make it look better?

The following is the source for a matrix I'm using in my document: \documentclass{scrartcl} \usepackage[english]{babel} \usepackage[T1]{fontenc} \usepackage[latin1]{inputenc} \usepackage{amsmath} ...
4
votes
3answers
113 views

Alignment problem between multiple line “bmatrices”

I'm having problems trying to align single and multiple line bmatrices: \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} \begin{align*} x = &\begin{bmatrix} ...
12
votes
2answers
2k views

vertical dotted line in column vector / amsmath matrix

I would like to typeset the following set of equations: ... but with contiguous, vertical dotted lines in the column vectors, such that the top and bottom rows of the matrix and of the vectors are ...
7
votes
1answer
1k views

Add Overbrace to describe a column of matrix

I want to add some over-braces to a matrix to get the following output: However, this this what I managed to get: I don't know how to get the neuron 1 and neuron 2 headings...I was thinking of ...
5
votes
1answer
151 views

Trouble creating properly aligned matrix within a matrix

I'm trying to insert parentheses around a group of elements creating a matrix within a larger matrix. So far I have this: \begin{equation} \begin{bmatrix} \begin{matrix} 0 & 0 \\ 0 & \omega_0 ...
6
votes
1answer
206 views

Breaking equation in align enviroment to put textwidth matrix in separate line

I have to put a textwidth pmatrix into an align environment. When using split, it destroys the centered alignment of the other equation. Pseudocode: \begin{align} \vec{a} &= \vec{b} + \vec{c} ...
6
votes
3answers
1k views

alignat makes 3 good alignments and 1 bad

I'm having a problem with the alignat environment. This code: \begin{alignat*}{9} &X_{12}&+X_{13}& & & & & & & &=1 ...
6
votes
1answer
400 views

Copy-able Matrix/Grid

I have grid-formatted data: 1 2 3 4 5 6 7 7 9 I'd like to display this as above in a LaTeX document compiled with pdfLaTeX. I've thought about using the TikZ Matrix library and the AMSMath Matrix ...
11
votes
2answers
529 views

How can I add clips above matrix?

\documentclass{mwrep} \usepackage{kbordermatrix} \usepackage{amsmath} \begin{document} \begin{equation} \bar{P}= \kbordermatrix{ \mathrm{state} & 1 & 2 & 4 & 3 & 6 & ...
5
votes
1answer
128 views

Centering item along several nodes in bmatrix

How can I position X exactly in the middle of space between a and d column? \documentclass{article} \usepackage{amsmath} \begin{document} \[ \begin{bmatrix} a & b & c & d & e \\ ...
9
votes
4answers
2k views

Text above matrices

I am new to latex and I am trying to create So far I have been able to create the matrices, like so: \[ N\textrm{ spectra} \begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1M} \\ ...
3
votes
2answers
259 views

How to put a full stop at the bottom, not mid-line, after an aligned matrix?

How can I put a full stop at the bottom rather than at mid-line following the end of an aligned matrix expression such as $\begin{pmatrix} x\\ y \end{pmatrix}$?
5
votes
2answers
5k views

Set horizontal width of matrix in amsmath [duplicate]

Possible Duplicate: Is there a way to slightly shrink a table, including font size, to fit within the column boundaries? I have a 16x16 pmatrix. How do i set the width so it doesn't ...
14
votes
4answers
7k views

Diagonal dots spanning multiple lines/columns of a matrix

I'm filling in large sparse matrices, for example \begin{bmatrix} 0 & -2 & 1 & & -1 & 2 \\ 2 & \ddots & \ddots & \ddots & & -1 \\ ...
15
votes
1answer
604 views

How does this macro for augmented matrices work?

I've used this code I found somewhere to typeset literally hundreds of augmented matrices, and it's been amazing: \documentclass[a4paper,12pt]{article} \usepackage{amsmath} \usepackage{arydshln} ...
6
votes
1answer
238 views

Using “found” code to typeset augmented matrices, want [] instead of ()

Here's a minimal example of what I'm doing presently: \documentclass[a4paper,12pt]{article} \usepackage{amsmath} \usepackage{arydshln} \makeatletter \renewcommand*\env@matrix[1][*\c@MaxMatrixCols ...
6
votes
2answers
2k views

How can I put a matrix in a figure caption?

I would like to put a matrix in a figure caption. The following example demonstrates the idea: \documentclass{amsart} \usepackage{graphics, epsfig, psfrag} \begin{document} \begin{figure} ...
5
votes
2answers
501 views

pmatrix without changing font size

In Plain TeX with the amstex package, is there a way to tell \pmatrix to NOT change font size? E.g. when I do: \sum_{\pmatrix a \\ b \\ c \endpmatrix} I end up having to insert \scriptstyle three ...
6
votes
4answers
801 views

Obstacles to simulating an amsmath matrix by a TiKZ matrix of math nodes

I'm trying to figure out a TiKZ-based solution to this problem involving arrows between matrix rows. To this end, I would like to at least be able to make a matrix of math nodes simulate the behaviour ...
9
votes
2answers
1k views

Broken matrix - gaps in brackets

This is my minimal working example. \documentclass[12pt,a4paper]{mwrep} %\usepackage{amsfonts} \usepackage{amsmath} %\renewcommand\baselinestretch{1.5} \begin{document} \chapter{Example} ...
27
votes
4answers
4k views

Using display style fraction in a matrix environment

I'd like use the \dfrac command in a bmatrix environment as follows: \documentclass{article} \usepackage{amsmath} \begin{document} \[ \begin{bmatrix} \dfrac{\partial f}{\partial x} \\ ...
2
votes
1answer
4k views

Two matrices side by side

I'm trying to typeset two matrices side by side, somewhat like: A = (matrix) B = (matrix) I tried to next the matrices inside an align environment: \begin{align*} A &= \begin{pmatrix} ... ...