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

learn more… | top users | synonyms (1)

25
votes
2answers
14k 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} & \left(\begin{array}{@...
10
votes
2answers
11k views

Matrix in small size

Does anyone have a good idea for an alternative matrix definition with a font size between the standard size used for say pmatrix and the \scriptstyle size used by smallmatrix? I have several vectors ...
2
votes
1answer
2k views

Produce matrix with labels underneath

Sorry if this has been asked before, I am trying to produce a matrix that appears as in the linked image. In particular, I am wondering how to get the labels on the top and bottom of the matrices, as ...
7
votes
4answers
896 views

What is the best way to indicate repeated off diagonal elements in a matrix/array?

I'd like to typeset a matrix of the following kind: When the symbols involved are big, like, in place of $r$, suppose we had $\mu(k-1)$ and in place of $\lambda$, we had $\mu(k-2)$, the matrix B below ...
7
votes
1answer
642 views

Linking the columns widths of two tikz matrices

I have two figures containing a tikzfigure with a matrix. Both matrices are related, i.e. have the same columns, and I would like tikz to assign them the same column widths, just as if I had all rows ...
6
votes
2answers
839 views

Foreach loop with command inside Tikz matrix

This question is directly related to Foreach inside a TikZ matrix. But I can't expand it with a macro inside, such that: \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} \usepackage{...
11
votes
2answers
27k views

Misplaced alignment tab character when building a matrix

I'm still new to latex. I've been having a problem with building a matrix and I have no idea what I'm doing (or what I'm doing wrong), so be gentle please :) \begin{matrix} 5 & 6 & 7 \\ 4 &...
13
votes
2answers
686 views

Long dashes for denoting omitted columns of a matrix

Mathematicians would often to like to think of a row of a m by n matrix with entries from a , say, field, as a vector in the n-dimensional vector space over the field. Though I am not a ...
3
votes
1answer
2k 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 ...
4
votes
1answer
2k views

Maxima exported file in LaTeX

I exported this document from Maxima. \documentclass{article} %% Created with wxMaxima 12.01.0 \setlength{\parskip}{\medskipamount} \setlength{\parindent}{0pt} \usepackage[utf8]{inputenc} \...
11
votes
3answers
1k views

Column sums in matrix array

I am trying to get my equation to look like the following: I cannot seem to get anywhere close (is there a way to get labels in \bordermatrix to go at the bottom?). Here is my code so far (without ...
11
votes
2answers
537 views

Programmatically setting column style of a matrix in TikZ

I'm trying to programmatically set the style of the columns of a TikZ matrix. My attempt is the following: \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} \begin{...
7
votes
1answer
6k views

How to print a LaTeX matrix using xtable in R

I'm trying to get R to print a matrix as a LaTeX matrix using xtable, using the LaTeX environment bmatrix. a <- matrix(rnorm(25), 5 ,5) x <- xtable(x) > print(x, floating=FALSE, tabular....
7
votes
1answer
504 views

Matrix vertical alignment in combination with double spacing

Why does the following code mess up the vertical alignment in the matrices? \documentclass{article} \usepackage{amsmath} \usepackage{setspace} \doublespacing \begin{document} The first case is $\...
5
votes
2answers
7k views

How to write a vertical vector in LaTeX for LyX

I can't work out how to write a vertical (two dimensional) vector, with brackets spanning two lines. Do you know how to write it for LyX?
5
votes
3answers
574 views

TikZ frameworks in my matrix are skewed

I would like to draw frameworks around certain submatrices of a large matrix, like described in this question: Highlight elements in the matrix. I tried some of the provided solutions and ended up ...
7
votes
3answers
2k views

Tikz - How to nest nodes in a matrix so they can be connected?

I want to make a matrix which has multiple nodes in a single matrix cell. These nodes should be centered to each other. I managed to make this work by using a nested tikz environment like so: \...
12
votes
2answers
721 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 ...
7
votes
1answer
700 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 ...
8
votes
1answer
8k 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 \} \\ ...
16
votes
2answers
5k 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 ...
15
votes
1answer
7k views

matrix in a matrix

I would like to draw a matrix with top left, top right, bottom left and bottom right blocks. The top left should be a 3x3 matrix with numerical entries, the top right is 0, the bottom left is 0 and ...
4
votes
1answer
881 views

TikZ-equivalent of bordermatrix with automatic alignment of labels

I would like to create a TikZ matrix (containing pictures in the cells) and annotate rows/columns of this matrix is the same manner as \bordermatrix allows. This is (approximately) a picture of what I ...
7
votes
2answers
3k 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 ...
3
votes
1answer
419 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
2answers
844 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
246 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 \\ ...
5
votes
2answers
2k views

breaking lines in a matrix/array environment

I have a matrix whose entries are quite long and must be broken up across multiple lines. The desired break-points are the + operators separating terms in each matrix element. The following code is ...
6
votes
1answer
1k views

How can I add some enhancement to the matrix [duplicate]

Possible Duplicate: Highlight elements in the matrix \documentclass[12pt,a4paper]{mwrep} \usepackage{amsmath} \usepackage[nodisplayskipstretch]{setspace} \setstretch{1.5} \begin{document} \...
19
votes
4answers
4k views

Draw a line through one column of a matrix

I'd like to "cancel" (draw a line through) a column of a matrix (using \begin{pmatrix}..\end{pmatrix}). How can I do this?
3
votes
1answer
256 views

How to align macros to correct order in TikZ matrix?

How to fix the broken placement of macros in matrix? \documentclass{article} \usepackage{tikz} \begin{document} \newcommand{\macroA}{ \begin{tikzpicture} \node[minimum height=1.5cm,minimum width=1....
2
votes
1answer
937 views

Adding text over matrix in LaTeX

I am trying to accomplish this in LaTeX. j ⎡a b c⎤ |d e f| ⎣h i j⎦ so that the "j" is aligned with the center of the matrix. It seems like I can't use the \begin{align} ...
3
votes
1answer
577 views

tabular as matrix

I have the attached figure and I need to have arrows from the entries of the table on the right-hand-side (one which says Dimensions List DL) to nodes of the tree. I think the best way to do this is ...
8
votes
1answer
8k views

Different arrow line styes and different row sizes in tikzpicture

I am using tikzpicture environment, together with \matrix command to draw a diagram. I have two questions: Can I use different arrow line styles in the same matrix? For instance, the matrix called m,...
6
votes
1answer
5k views

How to create a matrix with rows and columns labeled (at the right side)?

I would like to create a matrix with rows and columns being labeled. I would like the matrix elements to be right aligned, the row labels being displayed to the right of the matrix, and the column ...
3
votes
1answer
972 views

Example of matrix node in trees in tikzpicture

I'm trying to recreate this image using tikz matrices in a tree. I can create the first node and can hook up to children, but I can't get the syntax for including more matrices as child nodes of ...
7
votes
1answer
431 views

Twist a single line matrix in TikZ

I have a single line matrix made with TikZ: \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} \begin{tikzpicture} \node [matrix,fill=white!20,draw=blue] (my matrix) ...
8
votes
1answer
323 views

Make the `\ddots` looks well in a transformed matrix

I want to typeset a large matrix: \addtocounter{MaxMatrixCols}{8} \begin{pmatrix} 1\\ &\ddots\\ & &1\\ & & &0& & & &1& & &\...
7
votes
1answer
3k views

Write elements above and right outside the matrix

I found writing matrix's code is a boring work. There is one, you can see in pic below. Can anybody help?
32
votes
3answers
30k views

How do I left-align entries in a matrix with \begin{matrix}?

I'd like to left align the -1 entry in the following matrix so that the 1s line up. Is there a way to get matrices to ignore signs in that way? \begin{matrix} 1 & 1 \ 1 & -1 \ \...
0
votes
1answer
305 views

Typing Block matrix between texts than in separated picture?

How can I type a block matrix for instances a square that divided on each side between lines in LaTeX? Namely between $...$?
5
votes
1answer
2k views

Tikz positioning in matrices

Due to the help of some posts on StackExchange (mostly [1] and [2]) I think that I got the gist of categorizing matrix rows and columns with braces and separating them with lines in TikZ. However, I ...
8
votes
2answers
906 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 ...
5
votes
1answer
843 views

tikz matrix : centering cells

I have what's below and I do not know why the term m_{n+1,k} is not horizontally centered in its cell? \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary{matrix,...
15
votes
2answers
7k views

How to typeset a matrix with MathJax?

I need to typeset a matrix with square brackets as delimiters for math.se (I believe they use MathJaX). How would I do that?
4
votes
1answer
927 views

How to achieve double border line between some columns of tikz matrix?

I've read TikZ matrix as a replacement for tabular which nicely explained how to get table with borders in the first place. Now, I'd like to have let's say thicker border (or double border line) ...
8
votes
3answers
20k views

matrices too big to fit the width of a page

When I type matrices in beamer class, they are often too big to fit the width of a page. What is the way to make the matrices smaller? I also want to make the font of the entries of these matrices ...
12
votes
4answers
4k 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} \\ ...
8
votes
1answer
1k views

How to cross a row in matrix with a line?

Is there an "easy" way to cross the row in a matrix with a line? I am trying to demonstrate to my students how to type in LaTeX their homework assignment on Boolean function. The below table is used ...
5
votes
1answer
345 views

special symbol for matrix index l

In the following image there are two different styles used for matrix index l. The first one is the default one. How can one get the second one? The code is for the first equation is $\sum_{kl}V_{...