# Tag Info

## New answers tagged matrices

3 votes
Accepted

### Procedural matrices in tikz

Maybe you will be interested in nicematrix. This environment provides a command \pAutoNiceMatrix to construct matrices with a Tikz node under each cell of the matrix (however, these matrices are not ...
• 25.1k
7 votes

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

Here is a solution with {bNiceMatrix} of nicematrix. \documentclass{article} \usepackage{nicematrix} \begin{document} \$\underset{m \times n}{0} = \begin{bNiceMatrix} 0 & 0 & \ldots & 0 \...
• 25.1k
8 votes
Accepted

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

I wouldn't be so fussy about showing the definition of a zero matrix like that, but you know your students… \documentclass{article} \usepackage{amsmath} \usepackage{lipsum} % for mock text \begin{...
• 985k
0 votes

### Determinant of 3x3 matrix by cofactor expansion

I did not solve exactly your problem but a similar one from which you could extract useful information. I needed to solve a determinant far more general. I used plain TikZ and the matrix function ...
• 2,099
0 votes

### Draw a box around matrix elements

With {bNiceMatrix} of nicematrix, which, as the Tikz library matrix does, create a PGF/Tikz node under each of the matrix (if you need them...). \documentclass{article} \usepackage{nicematrix} \begin{...
• 25.1k
1 vote

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

I'm not sure this is a good idea, but it accomplishes what you want. You can use the trimclip package to literally cut your huge matrix into two pieces. Then use the multline environment to place the ...
• 20.1k
2 votes

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

Even if you render the (unnumbered) equation in landscape format -- say, with the help of the rotating package and its sidewaysfigure environment -- you'll still need to round the numbers from 4 to 3 ...
• 435k
2 votes
Accepted

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

Like this? \documentclass{article} \usepackage{amsmath,amssymb} \begin{document} $\lfloor\cdot\rfloor$ \end{document}
• 46.2k
4 votes
Accepted

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

The coding of this matrix product is quite straightforward, just take the time to write the four matrices that make up the formula with indexed variables. \documentclass{article} \usepackage{amsmath} \...
• 1,591
1 vote

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

Welcome to TeX.SE! please always provide, if possible, a small but complete document (with your matrix), which we can compile as it is your problem is possible simple solve by use of the nicematrix ...
• 251k
4 votes

### Horizontal spacing bmatrix in align environment

I propose to combine playing with \arraycolsep and using a medium-sized matrix (80% of displaystyle size), as defined in the nccmath package: \documentclass[12pt]{article} \usepackage{...
• 259k
4 votes
Accepted

### Horizontal spacing bmatrix in align environment

I'd define a varmatrix environment where you can set both the \arraycolsep and the font size. This is much more flexible, because you can decide for \normalsize and reduce the separation, but also to ...
• 985k
3 votes

### Horizontal spacing bmatrix in align environment

You can insert a 4pt space between columns using the @{} syntax for matrix. Also, use &= not =& for proper spacing. \begin{align} x &= \left[\begin{array}{*{24}{c@{\hspace{4pt}}}} ...
• 20.1k
3 votes
Accepted

### Displaying matrix with dots

This can be done with nicematrix. Note that you must compile twice. The commands \Cdots, \Vdots and \Ddots should replace \cdots, \vdots and ddots respectively. These commands will continue the dots ...
• 20.1k
2 votes

### Matrix within a matrix

Only amsmath \documentclass{article} \usepackage{amsmath} \begin{document} \[ \begin{bmatrix} x_{11} & \begin{matrix} x_{12} & \dots & x_{1n} \end{matrix} \\ \begin{matrix} x_{21} \\ ...
• 985k
4 votes
Accepted

### Matrix within a matrix

With {pNiceMatrix} of nicematrix. \documentclass[12pt]{article} \usepackage{nicematrix} \begin{document} \[\begin{pNiceMatrix} X_{11} & X_{12} & \Cdots & X_{1n} \\ X_{21} & \Block{3-...
• 25.1k
4 votes

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

With {pNiceMatrix} of nicematrix which creates PGF/Tikz nodes in the matrix and Tikz to draw arrows using those nodes. \documentclass[12pt]{article} \usepackage{nicematrix,tikz} \begin{document} \...
• 25.1k
4 votes

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

I propose a pstricks solution: \documentclass[12pt]{article} \usepackage{amsmath} \usepackage[svgnames]{xcolor} \usepackage{pst-node} \begin{document} ...
• 259k
6 votes

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

I suggest using tikzmark. Remember that you must compile twice. Unrelated: You don't seem to be using align, so I changed it to equation. \documentclass[12pt]{article} \usepackage{amsmath} \...
• 20.1k
2 votes

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

It's not clear why you turn on and off math mode. I provide the solution for blkarray, but also a simpler one based on nicematrix. \documentclass{article} \usepackage{amsmath} \usepackage{blkarray,...
• 985k
2 votes

### drawing a transition state integrated in a matrix

I happened to have an example of how to color specific pairs of coordinates with NiceTabular using \CodeAfter. The loop in \foreach uses evaluate=\x as \i using {int(\x+2)} in order to correct the ...
• 2,887
0 votes

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

Commands like \big, \Bigg etc. manually define the size of your braces and delimiters. So you will only ever get one size of a bracket per command. Using \left\{ ... \right\} will dynamically resize ...
3 votes
Accepted

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

A few notes: Only load the packages you are actually using in your document. Load mathtools instead of amsmath to use the bmatrix* environment, which allows right-justification Use \left and \right ...
• 20.1k
-1 votes

### How to create the following diagonal matrix in Latex?

A=\begin{pNiceMatrix}[nullify-dots,xdots/line-style=loosely dotted] \gamma & \lambda & 0 & & \Cdots & 0 \\ \lambda & \gamma & \lambda & \Ddots &...

Top 50 recent answers are included