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

learn more… | top users | synonyms (1)

12
votes
2answers
492 views

Print zeroes in a sparse matrix in a lighter color

For a report I need to print some sparse matrices as full matrices, so that means that there are a lot of zeroes. If I print them in the same color as the meaningful entries, it doesn't look very ...
11
votes
2answers
595 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 & ...
4
votes
2answers
4k 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 ...
12
votes
2answers
3k views

Arrows at right angles on a tikzpicture matrix

I'm trying to do something pretty simple but haven't been able to find an answer so far. I have a flow chart and I want to draw straight arrows at right angles instead of 'bent' arrows, inside of a ...
9
votes
4answers
444 views

Squares in Matrix

I would like to write a matrix equation, where the matrix contains equally sized coloured blocks on the diagonal. Something like: Does anyone have any idea how to go about this?
7
votes
2answers
970 views

braces over matrix

I want to make an overbrace and a side brace on my matrix in order to indicate its size. How can I achieve that. \begin{pmatrix} 1 & 1 & 0 & .& . & . & 0 & 1 \\ 0 ...
2
votes
1answer
353 views

How can I add size of Tikz drawing into size of equation? (PART 2)

Related to: - How can I add size of Tikz drawing into size of equation? Code presented below is the result of combining code from solutions to: - How can I add clips above matrix? - How can I add some ...
11
votes
3answers
4k views

Vertical vectors in angle brackets

I wanted to produce the following formula: which is nothing but a vertical vector in angle brackets. I expected the following code to do the job: \left\langle \begin{matrix} a \\ ...
8
votes
3answers
520 views

TikZ Matrix - How can I align content horizontally which is spanning over multiple cells/rows?

I'd like to finetune the big rectangle in the last column and its content, i.e. that it's all aligned to the third column's center. It is currently too far on the right: So far I have been unable ...
8
votes
1answer
5k views

How to label a line created with draw command

I have the following: \begin{tikzpicture} \matrix (m) [matrix of math nodes, row sep=1em, column sep=3em]{ \quad & a_1 & \quad \\ b & a_2 & \{ a_1, a_2 \dots a_n \} \\ ...
6
votes
2answers
2k views

braces on the sides of an easybmat matrix

I created the following matrix with easybmat, and I would like to add at the bottom (respectively right) something like an underbrace (resp. "rightbrace") under each of the two blocks, together with a ...
6
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.
5
votes
1answer
342 views

Highlighted Matrix with brackets

I would like to produce the matrix as shown in this figure: At the moment, I have this code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} ...
3
votes
3answers
2k 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 ...
11
votes
3answers
452 views

How to create diagonal matrix with an aligned diagonal?

How do I display truly diagonal matrices? I want to have a diagonal bloc matrix. The solution below has several problems : the diagonal terms aren't really aligned in the first half, and the diagonal ...
9
votes
2answers
833 views

Tikz foreach inside matrix

Apparently this question has been asked a hundred times already. But I couldn't get it to work with any of the answers provided. I want to have nested for loops inside a Tikz matrix. Something like: ...
8
votes
2answers
521 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 ...
6
votes
3answers
1k 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 \{ ...
5
votes
2answers
381 views

Matrix doesn't shrink when put in fraction.

This is my minimal example, the problem is the different size of the two x. I would expect the matrix to be shrunken too, but it isn't. Why is this and how is it corrected? ...
3
votes
1answer
6k views

Problem putting matrix operations in an equation [duplicate]

Possible Duplicate: Errors in matrix equation? I'm trying to use official equation container for the first time, and it's giving me some trouble. I have this equation of a simple matrix ...
3
votes
1answer
560 views

Parentheses size around matrix

I would like to get 1:n matrix with \left, \right size parentheses. Default size looks not so good. Now I have $\begin{pmatrix} f_0 & \ldots & f_L \end{pmatrix}^T$ The view I get I can ...
0
votes
2answers
97 views

How to built an abstract matrix? [duplicate]

I want to built a matrix like the picture: Have a trial: \begin{displaymath} \left( \begin{array}{ccc} b_{11} & \ldots & b_{1j} & \ldots & b_{1j} \\ b_{21} & \ldots & ...
9
votes
2answers
1k views

highlighting diagonal of a square matrix

I have a 3x3 eqnarray. Is there a way to highlight the diagonal with background color, perhaps using tikz? I was using tikz ellipse to highlight equation terms, though stretching the ellipse to the ...
10
votes
2answers
2k views

Gaussian reduction of matrices

I have to show a Gaussian reduction in an assignment, and I was wondering what the more space-efficient and neatest way of expressing this is. I thought about using \begin{smallmatrix} (it's only a ...
10
votes
3answers
6k views

How to construct a confusion matrix in LaTeX?

A confusion matrix looks like: Is there an easy way to do the same using LaTeX? Otherwise I could just create a diagram with any software.
9
votes
3answers
1k 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. ...
9
votes
2answers
574 views

How to typeset this in LaTeX

I would like to typeset the following matrix: However, I don't know how to achieve the braces and the dots leading to the matrix entry.
14
votes
1answer
276 views

Are there specialized libraries or packages to draw blocked/partitioned/splitting matrices in Tikz?

I need to write matrix splitting and factorization operations (for my linear algebra course). It is hard to do these is direct Latex. I can use Visio to draw these easily, but I'd prefer to use Tikz ...
12
votes
2answers
2k views

Using brackets as delimiters for matrix in TikZ-PGF Matrix Library

The TikZ-PGF manual is clear that for the matrix library, the delimiters are parentheses and braces: Delimiters are parentheses or braces to the left and right of a formula or a matrix. I ...
10
votes
1answer
4k 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 ...
10
votes
1answer
2k views

Compiling a BIG matrix

I have a large matrix (say, 100x100) in LaTeX code and I want to view it in a human-readable form. Obviously compiling the TeX code (of the matrix and nothing else) is the best way (much better than ...
5
votes
1answer
575 views

How to make a full equation with tikz?

I am using this solution here to make long dashes within a matrix, and it is working well. The code is: \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} % possible to customize here ...
2
votes
2answers
14k views

Vertical line in matrix using LaTeXiT [duplicate]

Possible Duplicate: What's the best way make an “augmented” coefficient matrix? I am trying to make a vertical line in a matrix in LaTeXiT. I have read that it should be ...
15
votes
1answer
667 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} ...
13
votes
4answers
1k views

Drawing Young tabloids

I would like LaTeX to produce output like the following (without the 2 a so called Young tabloid), ideally by writing \ytabloidshort{123,56} (using one character per cell, ideally allowing ...
12
votes
2answers
4k views

Label rows of a matrix by characters

How to add label to index the rows and columns of the matrix ? because I want to number the line outside the matrix \[ \begin{array}{lc} \ Mat_{\varPhi to M} & ...
11
votes
3answers
240 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 ...
6
votes
2answers
507 views

How to force nodes to have the same size in tikz matrices

Is there some intelligent way to have several tikz nodes have the same height and width? Consider the following example with output below. I'd like every node in each row to have the same height ...
6
votes
2answers
1k 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} ...
6
votes
1answer
1k views

Centering xymatrix in equation environment

The xymatrix diagram does not seem to vertically align when grouped in an equation environment. For example, this code produces the following image (which seems to place the xymatrix 2.5em lower than ...
5
votes
1answer
706 views

Block matrix equation with dimensioning

I need to write following matrix equation in LaTex. The dotted lines shown need to be present in the structure but need not have colors (could as well be black). I have used it here only to show the ...
3
votes
1answer
2k views

Vertical align in tikz matrix

\documentclass[a4paper,12pt]{report} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} \begin{center} \begin{tikzpicture} \tikzset{square matrix/.style={ matrix of nodes, column ...
10
votes
3answers
3k views

Border matrix with multiple indices on top and bottom

How can I write a matrix where there is an index at the top and also at the bottom? \bordermatrix doesn't seem to have an option for multiple indices.
8
votes
3answers
200 views

Align matrices problem

I have an equation of matrices and I want to align the dimensions of the matrices below the equation of matrices. However, I produce something very ugly. Can someone advise how to make it look better ...
8
votes
2answers
1k views

Creating straight line in matrix

I need to add some straight lines inside a matrix to indicate labeling of rows, like this: How do I do that?
8
votes
2answers
771 views

Enforcing That \array Stays Square When Drawing Matrix

I'm trying to draw a block matrix in LaTeX, and this is what I have so far: \begin{array}{|c|c|} \hline I_{r \times r} & 0 \\ \hline 0 & 0 \\ \hline \end{array} Here's a ...
8
votes
3answers
3k 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 ...
7
votes
2answers
144 views

How can I get the explanation borders with pmatrix?

I have asked this question in chat. How can I add the explanation borders to the below matrix? \begin{align*} C_{D_{1\succ 2}, \mathrm{increasing}} &= \underbrace{\begin{pmatrix} 1 & ...
7
votes
2answers
1k 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} ...
6
votes
3answers
275 views

Matrix decomposition dimensions diagram

What's the easiest way of making diagrams depicting matrix dimensions such as the following? I can do it with simple subscripts, but I like the visual effect that these diagrams give.