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

learn more… | top users | synonyms (1)

5
votes
1answer
452 views

Highlight elements in the matrix (continued)

Using @Stefan Kottwitz's solution of Highlight elements in the matrix, is it possible to select one single entry in the matrix? Where does one need to place the left and the right marks?
2
votes
0answers
307 views

Formatting big matrix and ratios using multi-row entries [closed]

It is possible to write the denominator or the numerator of a ratio, as well as the entries of a matrix, in multiple rows? This could be helpful in order to format long equations inside a document. ...
4
votes
2answers
482 views

aligning equations in smallmatrix environment

So for example, in the next code I get my equations in center aligment, I'd like to have them aligned to the left. $(a_{2})_{pq}=\left \{ \begin{smallmatrix} (a_{1})_{pq} ,p\neq i \\ (ca_{1})_{pj}+(...
9
votes
1answer
435 views

Replacing Leading Minus Signs in Environment

In this question concerning negative signs and the alignment of entries in matrix environments, Heiko Oberdiek gave a great answer in which he uses a user-defined command called \matminus instead of ...
8
votes
2answers
949 views

Equation with Large Matrix Dimension

I'm trying to code this matrix equation below, I'm not an expert in latex, but I've been successful dealing with other matrix equations. However with this one, I can't achieve it. The alignment of ...
9
votes
1answer
959 views

Heatmap of a triangular matrix (or a sparse matrix)

So let me first of all shamelessly steal heatmap code from this answer to Drawing heatmaps using TikZ \documentclass{standalone} \usepackage{colortbl} \usepackage{pgfplots} \usepackage{pgfplotstable} ...
6
votes
2answers
174 views

Matrix with only $a_{i1} \neq 0$ in first column

Assume that A is square. I would like to display this as follows (for i > 1): a_{i1} in its position, 0 ... 0 (transposed) on top and below this element, and a rectangle to the right of the first ...
0
votes
0answers
26 views

Weird pmatrix error [duplicate]

Possible Duplicate: How to create a matrix with 20 columns in latex I am trying to present a matrix with the following code: $$ B_{1}=\begin{pmatrix} 1&1&1&1&1&1&1&...
28
votes
1answer
12k views

How to create a matrix with 20 columns in latex

The code below works, but when I add 10 more columns, it does not. So, how can I add ten more columns to the matrix below? \documentclass{article} \usepackage{amsmath} \begin{document} \begin{...
3
votes
2answers
7k views

A matrix inside a table [duplicate]

Possible Duplicate: Column padding in tables I am trying to insert a matrix inside a table, and I am looking for a good way to do this. Usually when I write matrices in equations, I use array ...
2
votes
2answers
1k views

Whitespace surrounding elements in a matrix

I was just wondering, when writing a matrix in the following way \begin{pmatrix} \begin{array}{cc} -5 & 3 \\ 6 & -4 \end{array} \end{pmatrix} I get quite a lot of ...
0
votes
0answers
43 views

The gaps in a matrix brackets [duplicate]

Possible Duplicate: Broken matrix - gaps in brackets I created a matrix in latex, but there are gaps in its brackets. Does anyone how to fix it? Here is the code: \documentclass{article} \...
6
votes
1answer
316 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} \\...
1
vote
0answers
63 views

Drawing a box around certain parts of a matrix [duplicate]

Possible Duplicate: Highlight elements in the matrix i have a matrix: \begin{equation} \begin{bmatrix} 1 & 5 & 4 & 2 & 1 \\ 1 & 5 & 4 & 2 & 1 \\ 1 ...
3
votes
3answers
3k views

Specify dimensions of block matrices in Latex

I recently started learning LaTeX and though I found answers for almost all of my questions by looking online (and especially here), there is still one more thing I would like to be able to do but can'...
9
votes
1answer
859 views

How can I pad cells of a blockarray?

After some struggle, I was able to render the matrix I was after. It now has the right "shape", but it does not look very nice; especially the spacing between the bracket and the matrix contents is ...
6
votes
2answers
374 views

Centering \vdots in a sparse matrix with an even number of rows

I am trying to define only the non-zeros elements in a sparse matrix, thus using some \vdots where the entries are zeros and specifying the row when needed (using the blockarray command, with \...
1
vote
2answers
300 views

Change matrix figure layout

I have a figure where I am writing som matrices I want something like but I am getting this, How to change it? I have \begin {figure}[h] \centering \small \textbf{X} \[\left( \begin{array}{...
3
votes
1answer
496 views

Multiply matrix and letter

I want to multiply a matrix with a letter, it looks like that: \documentclass{report} \usepackage{ngerman} \usepackage{amsmath} \begin{document} \[ \left( \begin{array}{ccc} | & & | \\ ...
5
votes
2answers
1k views

Rotation of a bmatrix

I'm writing a report, with a restriction on page numbers. So I want to rotate a bmatrix that sticks out of the page (horizontal) and put it inside a \minipage. My bmatrix: \begin{equation} \...
7
votes
2answers
342 views

Passing an argument with the alignment operator (&) to a macro within another aligned environment

I am trying to write macros for quickly formatting matrices in math mode. Here is a simple, working example: \documentclass{article} \usepackage{amsmath} \newcommand{\pmat}[1]{\begin{pmatrix}#1\end{...
4
votes
2answers
648 views

Block matrices, separator with space

I want to write block matrices like the one shown below I tried underlining, fraction, and using __ as an entry by making three rows but they did not look nice.I want the horizontal lines inside ...
7
votes
2answers
2k views

Caption on side by side matrices

I have two matrices side by side, like this: \[ \left[\begin{array}{cc} a & b \\ c & d \end{array}\right] \qquad \left[\begin{array}{cc} e & f \\ g & h \end{...
10
votes
2answers
677 views

Why is picture and matrix not drawn at the same height

I'm trying to put a adjacency matrix beneath a graph using subfloat. The graph is drawn with tikz. No matter what I do, the matrix is put below the graph as shown here: The code is here: \begin{...
2
votes
1answer
246 views

Latex matrix not displaying right numbers

I've just started writing in latex to expose math problems to a forum. I am trying to display a matrix: \[ \begin{align*} \begin{matrix} 1 & -9 & 3 \\ 1 & 2 & -2 \\ -2 & ...
8
votes
2answers
2k views

Position two stacked tikz matrices

I would like to take two TikZ matrix, possibly of different dimensions and stack them. My demo code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} \begin{...
7
votes
1answer
193 views

TikZ compiles in body, but not as command [duplicate]

Possible Duplicate: Problem with defining shortcuts for TikZ matrices. When I use the code below to draw a tikzpicture in the body of my document, it works just fine. However, when I define a ...
3
votes
2answers
412 views

Multiple horizontal line separators? Multiple \over-s?

How to code the syntax like fraction, but with more than 2 components? Fractions consist of numerator and denominator while I need more. In other words: how to code column-matrix with horizontal lines ...
5
votes
1answer
285 views

Plot weighted frequency matrix

I wish to create this plot preferably in pgfplots or tikz. I have actually got a version plotted (with help from SO), but I have used R and exported the plot using tikzDevice. I can't post the ...
6
votes
2answers
447 views

Set Braces in XYPic, XYMatrix

I want to add three braces to a xymatrix in a xypic environment. Here's how I got so far. \documentclass[11pt]{article} % use larger type; default would be 10pt \usepackage[all]{xy} \begin{document} ...
7
votes
3answers
2k 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 \\...
9
votes
3answers
5k views

Matrix notation in ClassicThesis

In Classic Thesis Style Guide, the author suggests to not use bold fonts. For vectors an alternative is arrow \vec. If I don't want to use \mathbold, what is the best alternative to mark matrix in ...
3
votes
1answer
249 views

labeling diagrams with matrices

I it possible to label an arrow with a matrix in Xy-pic? In the following diagram I want to label the arrows with 2x2 matrices to represent linear maps between vector spaces, in the place of a,b and ...
11
votes
3answers
300 views

Matrix from graph description

Are there any LaTeX package that draws/plots/generates a matrix from a "graph" description (node relations). Any type of description/language could be useful. The trick is to generate automaticly a ...
7
votes
1answer
844 views

How to label arrows in tikz-cd diagrams with matrices?

I'm using tikz-cd for some commutative diagrams, but if I try to label an arrow with a matrix, & appears to be "undefined control sequence". So all the entries in a row get concatenated, and it ...
1
vote
0answers
108 views

How to use Line in Matrix [duplicate]

Possible Duplicate: \bordermatrix with brackets [ ] instead of parentheses ( ) I need to write a complicated matrix, that has a structure as in the attached picture
8
votes
1answer
680 views

bracket covering only a part of a matrix

How can I write a matrix, with brackets that cover only rows/columns in a certain range, but still has the right indentation? What I would like: My current solution: \[ \overset{ \begin{array}{...
1
vote
0answers
191 views

Matrix with arrow - problem [closed]

I am using the following code from this question: Highlight elements in the matrix \documentclass{article} \usepackage{tikz} \usetikzlibrary{fit} \tikzset{% highlight/.style={rectangle,rounded ...
4
votes
3answers
2k views

Is it possible to draw an n by n grid with text in each cell, with a different background shade/colour in each? (confusion matrix)

I am making a confusion matrix for a document, and I was wondering if LaTeX has the capabilities to handle this. It is essentially a table, but with background shading corresponding to the value in ...
6
votes
1answer
1k views

vertical lines in matrix using tikz package

my problem is interconnected to my two previous posts (here and here) and i've tried to incorporate answers into solution but without success. My task is this matrix multiplication with added ...
6
votes
2answers
158 views

nodes in matrix and its incorporation into document

i continue with my previous post (here) concerning various additions to matrix. I have following problem: how to add nodes into matrix and this whole matrix incorporate into the document ? My task is ...
6
votes
1answer
764 views

Adding nodes and horizontal lines for pmatrix

Yesterday, I posted question concerning solid diagonal line within matrix. But my problem continues, since I am supposed to add into the matrix even the vertical line and labels. Is there a way how to ...
21
votes
3answers
1k views

Matrix with labels nested in braces

What's the best way to produce a matrix with labels that are nested in braces, like this:
6
votes
1answer
4k views

diagonal line within matrix

I've got simple task - draw block of matrices, when one of the matrices contains diagonal and vertical lines. I am able to make diagonal dotted lines but so far i have not succeeded with solid line. ...
11
votes
6answers
7k views

Labelling Ax = b under an actual Matrix

I wish to achieve the following in Latex: | a b | x | x1 | = | b1 | | c d | | x2 | | b2 | A x b Where I write the labels A, x, and b under the respective matrices. The code I'm ...
4
votes
3answers
1k views

Writing a formula below a matrix

I have a matrix environment: \begin{bmatrix} ... \end{bmatrix} How can I write below that matrix? I tried with substack, so I wrote \end{bmatrix}_{\substack{...}} That doesn't work as it does ...
11
votes
1answer
6k views

Negative Sign and Matrix Alignment

I am having trouble centering the elements of a matrix such that the negative sign is not taken into account during alignment. Additionally, I would also like the space between the left parenthesis ...
4
votes
1answer
877 views

Alignment of nodes and scopes in tikz matrix?

I am trying to fix the positions of the arrows of the following diagram without much success. I would like the arrows to be centered (both horizontally and vertically) in the matrix cell no matter ...
6
votes
2answers
2k views

Vertically align the tops of matrices in an equation

The following matrix equation looks great: \begin{align*} \overset{A}{\left[\begin{matrix}t_{1}&1\\ \vdots&\vdots\\ t_{n}&1 \end{matrix}\right]} \overset{x}{\left[\begin{matrix} x_{1}\\...
6
votes
4answers
4k views

Side by Side matrices

How can I get matrices that are side by side? Currently I have the following: \[ \begin{pmatrix}[ccc|c] 1&2&0&0\\ -1&1&2&0\\ 1&0&1&5\\ 0&-2&1&4 \end{...