Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

# Questions tagged [matrices]

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

1,805 questions
Filter by
Sorted by
Tagged with
246 views

### Close align brackets

I was trying to close this bracket: \frac{}{}\theta=2\pi k + \begin{cases}\arctan\left ( \frac{n}{x} \right ) & \text{ if } x> 0 \\ \frac{\pi }{2} & \text{ if } x=0 \\ \arctan\left ( \frac{...
37 views

### Writing out vectors in a figure [closed]

I have a problem with writing a 2x1 vector in my figure (code below). They will only become 2x2 matrices with the element in the diagonal as one can see in the picture. Code: \def\arrowlength{2cm} \...
1 vote
40 views

### Procedural matrices in tikz

Is there a way to typeset a tikz matrix procedurally instead of manually? i.e. here's a MWE of a 4x4 identity matrix: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{matrix} \begin{...
• 147
490 views

### How can I have both horizontal and vertical curly braces in a matrix?

I want to make horizontal and vertical curly braces to show up simultaneously just outside a matrix, but it only works when I use one or the other, instead of both. I use \left.\right\} for vertical ...
• 345
1 vote
82 views

### Split a huge matrix across lines to fit on page

I'm writing my thesis and running into the following problem. I have a huge matrix (10 rows and 15 columns) which doesn't fit on a page. I would like LaTeX to split the matrix across lines, but right ...
• 61
26 views

### How do I type the skew-symmetric matrix notation. I am using overleaf and unable to find any leads. Appriciate for any help

The notation I am looking for is circled in red above
96 views

### What's the best way to create this formula with latex?

I'm trying to create this formula (the one with the matrices) for my essay in latex but I'm having a hard time finding the best way of going about it.
36 views

### How to include the overbrace in the below matrix in LaTeX?

Suppose, the below matrix is a n*n matrix with n-k entries 1 and rest k entries 0. I want to add two overbraces over the first row, one is upto all 1 mentioning n-k and the other one is all 0 ...
139 views

### Horizontal spacing bmatrix in align environment

I have a large block matrix in my document, which violates the page margin slightly. I would like to reduce the horizontal spacing between the matrix elements of a row. Additionally, I want to align ...
44 views

### Displaying matrix with dots

I want to display the following matrix (ignore the red box): But all I can come up with is the following, which is not what I want beacuse of the diagonal and vertical dots: I want the vertical dots ...
52 views

### Matrix within a matrix

I'm looking to make something like this: I can only create a matrix on one entry so far. How would one do this? Muchos gracias!
• 123
260 views

### How to create curved arrows from a number to another number above and below a matrix?

My code: \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} \begin{align} \pi=\begin{pmatrix} 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\\ 1 & ...
27 views

### \cdots in header of matrix is annoyingly shifted by few pixels, compared to column entries below it

That's my code: P= \begin{blockarray}{*{4}{c} l} \begin{block}{*{4}{>{$\normalsize}c<{$}} l} \text{Zustand 1} & \text{Zustand 2} &$\cdots$& \text{...
46 views

### drawing a transition state integrated in a matrix

I already know how to draw a transition state using TikZ but I need to draw something a little bit more complicated. Here is a picture of the diagram that I want to draw: Can somebody help me please ...
45 views

### Write out a basis with correctly formatted curly braces

I'm attempting to write out the bases of a matrix but I can't seem to get the formatting as I'd like it. I have looked online and I haven't come to an easy solution. Here is my work around. \...
• 190
82 views

### Latex matrix left entries [closed]

Could anyone give me advice on how to write such a matrix in latex?
• 123
107 views

### Create confusion matrix in Latex

I want to Create confusion matrix 5x5 in Latex (overleaf), background same color blue. I used this code: \begin{tikzpicture} \begin{axis}[ colormap={bluewhite}{color=(white) rgb255=(...
• 15
54 views

### how can I write parentheses for matrix exactly like in the picture?

how can I write parentheses for matrix exactly like in the picture? Thanks in advance
• 33
203 views

### How do I get less thick matrix lines?

Currently for my column vectors they look like this: I want them to look like this: Right now I'm using the lgroup/rgroup symbols to get them the right curliness, but I can't get them to be the ...
• 191
54 views

### Matrix with offdiagonal entries

Could anyone help with latex script for? Thanks in advance.
• 123
70 views

### Can I have solid lines instead of Cdots/Vdots in nicematrix?

Loading the nicematrix package, the code \begin{bNiceMatrix}[last-col,nullify-dots, margin] & & & \\ \Cdots & A_j & \Cdots & i\\ & & & \end{bNiceMatrix} ...
• 297
46 views

### Highlighting elements in matrices and linking them with other parameters with arrows

I would like to highlight some elements in a matrix and link them with arrows to their definition given on the matrix side (like in the picture below). I know there are possibilities to highlight ...
1 vote
51 views

### Matrix not spacing properly with subscripts

In this matrix with subscripts the braces are not ''containing'' the entires, how can I fix it? This is what I hope to do 👇 \begin{bmatrix} S_{11} &\cdots & S_{...
• 339
60 views

### How to put braces over certain parts of matrices?

I want to typeset something like this: I couldn't find a way to achieve this using array or blkarray. Any help?
• 297
1 vote
44 views

### Put several matrices in a compact way

I would like to put a series of matrices so that they occupy less space on the sheet, since I have a space limit and I do not want to occupy too much. The idea would be to group the matrices a1, a2 a3 ...
109 views

### Grouping Table Rows

I'm trying to incorporate groups row-wise for my following table: The current version is achieved with the following code: \documentclass{article} \usepackage[margin=25mm]{geometry} \usepackage{...
• 61
216 views

### How to right align matrix

\begin{align*} \mathbf{J}_{f} = \begin{bmatrix} -2 x \sin\left(y\right) ^{2} & -2x^{2}\sin\left(y\right) \cos\left(y\right) & 0 \\ \sin\left(y\right) & x \cos\left(y\right) &...
• 75
328 views

### How to draw a matrix/array with arrows between rows and between elements?

How to draw a matrix/array with arrows between rows and between elements?
67 views

### Latex - Create Concept Matrix with two dimensions

I am trying to create a concept matrix in latex that sticks with the following scheme: Is this possible to achieve? Do you have any starting points for such-alike table? Many thanks in advance!
• 61
298 views

### Amsmath pmatrix with column dividing line (rather than \begin{array})

I know it is possible to create a matrix with a column divider using \begin{array}: \left(\begin{array}{ccc|c} 5 & 1 & 5 & 0\\ 6 & 2 & 2 & 2\\ 0 & 3 & 4 &...
• 175
149 views

### Matrix with tuples outside and fractions inside spacing

I have the following Latex code which is a matrix with fractions inside and tuples outside. \usepackage{blkarray}% http://ctan.org/pkg/blkarray \newcommand{\matindex}[1]{\mbox{\scriptsize#1}}% Matrix ...
• 163
47 views

### How to make 1 figure with 4 subfigures containing matrices?

like in the title, but below is an image I want to restore in my LaTeX document. This is what I tried: \begin{figure}[h!] \begin{subfigure}[b]{0.2\textwidth} \begin{tabular}{|c|} \hline ...
• 1
235 views

### How to change the "curliness" of Matrix brackets?

How can I get my matrix brackets to look like the above instead of: My current one uses the following packages and has the latex: \documentclass[12pt]{article} \usepackage[a4paper]{geometry} \...
• 191
79 views

### How do I align a Tikzpicture with a matrix?

The following code \captionsetup[subfigure] \usepackage{tkz-tab} ... \begin{figure}[h!] \centering \subfigure[sub-title 1] {\label{} \begin{tikzpicture}[black,ultra thick, scale=0.5] \draw (1,0) -- (...
• 121
168 views

### matrix with external elements and dashed separation lines

I am trying to make a matrix with external elements and dashed separation lines for clarification. I have gotten pretty far using the blkarray package. However, I have failed to add a horizontal ...
• 471
50 views

### splitting equation with matrices into multiple lines

I'm struggling to split an equation with matrix math into multiple lines. I've tried multline and aligned environments with no luck. It doesn't seem to handle having the matrices within this equation. ...
• 21
1 vote
41 views

### Alignment and continuity of points in a matrix

Here is what I want to do: I want to be able to extend the horizontal dots so that they fill the entire line and the spacing between the dots and the x^n is the same as between the dots and x^2. In ...
• 189
138 views

### How can I add line break for large matrices? My matrix is too large and the right side can be submerged

\documentclass{article} \begin{document} \[\left( \begin{array}{ccccc} 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 \\ \frac{\epsilon m_w^2 x_t}{6 \epsilon ^2-7 \epsilon ...
226 views

### Why does my matrix look so vertically spaced apart?

In my document I use the code $$M \ = \ \left[ \begin{matrix} a & b \\ c & d \end{matrix} \right]$$ and the output gives me the following goofy looking matrix (...
206 views

### Representing the following matrix in Katex/HTML [closed]

I need to write this matrix, but how can I make it in KaTeX and HTML?
155 views

### Aligning columns of the matrix with the labels on r markdown

I am unable to align the columns of my matrix with the column labels. I have attached my code below along with the output. Can someone help me fix this pls ? I want to align 0, 1, 2, 3 to the ...
385 views

### How to construct a matrix within a matrix

How can one construct the following matrix, where each block is a $3\times 3$ matrix by itself?
• 199
76 views

### How to put a vertical line after the mth column without using nicematrix?

I have the following matrix \documentclass[10pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{...
• 933
51 views

### How to adjust the column and row spacing of the matrix in the preamble?

How can I adjust row and column spacing of the matrix in the preamble with \setstretch? My original code is: \documentclass{article} \usepackage{mathtools} \usepackage{setspace} \setstretch{1.5} \...
109 views

### Color diagonal of a matrix

I would like to color the diagonal and off diagonal elements of a matrix: I have: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{amssymb,amsmath,amsthm,enumitem} \usepackage[a4paper, ...
• 39
58 views

### How to insert a space inside NiceArray while maintain alignment of \Block with \SubMatrix

I am trying to align multiple math equations with braces using nicematrix The result above is as desired but I would like to Add small space after the third row. However, this causes the contents of ...
231 views

### Macro returning array with vertical line

I want to make a macro "mymacro" that returns an array with two rows. The macro has two variables and each variable is a string word composed with "b","o", "x", ...
• 73
300 views

### TikZ-matrix: add brackets around some blocks inside

How can I get brackets (say "normal parenthese math brackets") inside a TikZ-matrix around some blocks? For example here at the marked places: Is there a decoration or something? \...
• 6,217