{matrices} is about matrices in {equations} and {diagrams}.

learn more… | top users | synonyms (1)

4
votes
2answers
6k views

Cannot insert multirow within multicolumn

I want to make a matrix that incorporates both multirow and multicolumn. However the code doesn't work. Sorry if the question is stupid, I am playing with matrices the whole day and probably I am ...
3
votes
2answers
1k views

Weird error with xymatrix and pmatrix.

Please look at the following minimal example: \documentclass{article} \usepackage[all]{xy} \begin{document} \( \xymatrix{ \begin{pmatrix} 1 & 1\end{pmatrix} } \) \end{document} The output I get ...
0
votes
0answers
325 views

Matrix with labels [duplicate]

Possible Duplicate: bordermatrix with blocks I'm attempting to copy the matrix on this page: http://tiny.cc/ipliw with the labels outside the matrix. I can make the matrix (given below) but ...
7
votes
3answers
4k views

How do I typeset vertical and horizontal lines inside a matrix?

(From the notation used in course notes for Stanford CS229 available online.) I'm trying to typeset the following matrices made up of row or column vectors: Any ideas?
2
votes
1answer
1k views

Putting a rectangle around matrix nodes?

I built up a simple UML diagram, where one of the class boxes has an union containing a number of elements. I want to show that those elements are part of an union. But how can I do so with tikz? I ...
18
votes
5answers
13k views

bordermatrix with blocks

I need to write a complicated matrix, that has a structure as in the attached picture.
12
votes
3answers
41k views

How to have matrices side by side in latex?

I'm new to latex and all of my matrices seem to be created on new lines, I can't seem to put them side by side. Here is what I am doing to make a matrix (with the 2d identity matrix as an example): ...
10
votes
3answers
4k views

How to draw a separator between the columns of a matrix.

Is there a simple way to tell TikZ that I want a vertical line to separate the columns of a matrix? I know how to draw them manually, I am looking for an automatic solution, maybe using styles or ...
6
votes
2answers
5k views

Putting a tabular in a node within a matrix

I have a picture in which each of the nodes looks something like this: \node (species1) [shape=rectangle,draw] { \begin{tabular}{c c c} \multicolumn{3}{c}{{Species 1}} \\ \colorbox{red}{G1a} ...
5
votes
3answers
3k views

Submatrix in LaTeX

I would like to create something like this: i ( ) ( ) (______ ) j( | ) ( | ) The matrix including its submatrix can be created by using ...
7
votes
2answers
1k views

Positive and Negative power in matrices and fixed size

I'd like to create a matrix that has some positive power and negative power. I'd like to have an alignment to right, so for example: \begin{array}{rr} 3 \times 10^3 & 2 \times 10^3 \\ 3 ...
7
votes
3answers
2k views

Plot a matrix of real values with TikZ/PGF like imshow in matlab

How can I plot a matrix of real values with TikZ/PGF such that it looks like plotted with imshow in MATLAB? \addplot3 does something similar, but I'd like to have that in a color-coded 2D plot.
3
votes
2answers
8k views

Smaller matrices (or other math elements) in displayed math

I'm trying to find The Right Way to make a smaller matrix (but not a smallmatrix) along the following lines. Example: Consider the following piece of LaTeX code: % \usepackage{amsmath} in the ...
5
votes
1answer
714 views

aligning columns at decimal point in TikZ matrices

Is there a way to align numbers in a TikZ matrix at the decimal points, as is possible in normal tables (Aligning numbers by decimal points in table columns)? http://www.texample.net/tikz/builds/ ...
4
votes
1answer
2k views

TikZ: How to rotate a matrix (of nodes)?

Please consider the following TikZ code: % aligning text in node: node[align=left] only in latest 2010 tikz: % http://compgroups.net/comp.text.tex/-tikz-option-for-ragged-left-text-in-node % or use ...
3
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} ... ...
4
votes
1answer
1k views

How to make tikz center the cells of a matrix?

I want to construct complicated things in tikz matrices (but don't we all), and when I'm done, I want the rows and columns of the matrix to align along the centers of these complicated things. Here ...
6
votes
3answers
2k views

Same height for list of comma-separated vectors

I am trying to typeset a list of vectors spanning a multidimensional space, using the notation span{v_1,v_2,...,v_n} (I haven't found out how to inline it as rendered latex) i.e.: span \{ ...
3
votes
1answer
1k views

symmetric matrices

What are your solutions to properly place the shortcut 'sym' in symmetric matrices? \documentclass{book} \usepackage{amsmath} \begin{document} \begin{equation} ...
4
votes
4answers
3k views

vertically aligning vectors and matrices

What are your techniques to make what's below look better? Thanks. \documentclass{article} \usepackage{amsmath} \newcommand{\ud}{\mathop{\mathrm{{}d}}\mathopen{}} \begin{document} ...
4
votes
3answers
2k views

How to get TikZ nodes not to change alignment?

I'm still working on rendering a nice block matrix. I've been using BMAT but it is irrelevant for the question at hand. I want to connect various entries in an array/matrix/BMAT by lines, and I'm ...
2
votes
1answer
339 views

using easybmat and tikz packages together?

In continuation to this question, I was looking for a way to add nice diagonal lines inside a BMAT matrix to express a band structure of the matrix. However, a LaTeX file with both TikZ and easybmat ...
14
votes
1answer
7k views

How to typeset block matrices?

I need to typeset a block matrix that is made of a 2X2 structure of blocks such that the (1,1) block and the (2,2) blocks are zero and the (1,2) and the (2,1) blocks are non-zero (and happen to have a ...
5
votes
1answer
583 views

In TikZ, is it possible to nest matrices?

This is similar to this question, but not quite the same thing. I want to make a matrix of graphs that are all relatively the same, and I made the graphs using the matrix construct. [By the way, did ...
15
votes
6answers
5k views

Formatting arrows between rows of corresponding matrices

Some material I'm creating requires output that looks like this: (note the position of the arrows). I'm using the following code (with the AMS macros) to generate this, and I'm looking for ...
38
votes
5answers
86k views

typesetting column vector

I would like to define a command which typesets a column vector. For one vector I can have something like: \left( \begin{array}{c} a\\ b\\ \end{array} \right) I would like the command to produce ...
38
votes
5answers
18k views

What's the best way make an “augmented” coefficient matrix?

When studying systems of linear equations, it's nice to remind people that the last column of the coefficient matrix holds the constants. This is often done in books by putting a vertical line ...
2
votes
4answers
1k views

Defining a good tab-able macro for matrices.

I want to declare some macros in my preamble which allow me to create 2 x 2 matrices more quickly, and in particular, I want to be able to tab through the four entry positions. I feel like this is ...
23
votes
4answers
5k views

Multirow/multicolumn cells in TikZ matrices?

Is it possible to make TikZ matrix cells span multiple rows/columns, like they can in LaTeX tables using \multirow/\multicolumn? Specifically, I'd like to typeset something like the following in a ...
18
votes
2answers
2k views

Problem with defining shortcuts for TikZ matrices.

For answering a question yesterday I wanted to define a shortcut for creating a matrix inside a tikzpicture. As a minimal example, consider \newcommand\mymatrix[1]{ \begin{tikzpicture} ...
3
votes
1answer
928 views

Shrinking large matrices by preventing column alignment

I have a relatively large but sparse matrix (say 20x20). Maple has no problem displaying it on a screen because maple does not force the columns to be aligned when the matrix is large enough : element ...
42
votes
5answers
10k views

How do I label different rows or columns of a matrix using braces?

I have a matrix enclosed in brackets [ ] (or (), or {}, or |'s, or ||'s): - a b c d - | e f g h | | i j k l | - m n o p - which I want to label like so: R |---| -- - a b c d ...
10
votes
1answer
3k views

Aligning matrix nodes in tikz

Another question about aligning nodes using matrices in tikz. Consider the following: \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} \begin{tikzpicture} \matrix ...
68
votes
5answers
155k views

How to add a matrix to a LaTeX document

How do we add a matrix to a LaTeX document?