Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [matrices]

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

3
votes
3answers
196 views

How do I edit this matrix system of equations?

Is there a way to remove the right vertical line in the following matrix? \documentclass{article} \usepackage{amsmath} \begin{document} $ \begin{vmatrix} \alpha & -& \beta =180\\ \...
3
votes
2answers
45 views

smallmatrix using tikzpicture

I wish to use tikzpicture instead of smallmatrix, because the former offers better control for dots via this post. However, the code $\Z^4\!\xleftarrow{ \begin{tikzpicture}[baseline=(current ...
0
votes
1answer
42 views

Add upper brace on matrix with good alignement on each parameter

From this upper brace, I try to put a brace over the first 9 columns the 9 parameters below. I would like to align them with the 9 first columns of matrix, each one of this parameter aligned with each ...
3
votes
1answer
49 views

vertical centering in pmatrix

I have a little optical Problem with an horizontal alignment in a pmatrix. I would like to get an output like the below but the \vdots doesn't look nice. I would like to replace the two \vdots in the ...
10
votes
2answers
453 views

Unstandardized brackets in matrix

I wonder how to solve my problem. In 'normal' matrix we have a square brackets but I need to write a brackets like in photo Could you help me? I'm using \usepackage{amsmath}.
3
votes
3answers
35 views

Blockarray superscript

I am using blkarray to generate a labelled matrix. I would like to indicate the transpose of such matrix using a superscript with T. However I cannot find the right syntax to get what I want. Below ...
1
vote
1answer
37 views

Align diagonals of a labelled matrix with diagonal dots

I have a labelled matrix generated through the blockarray package. \documentclass{article} \usepackage{blkarray} \usepackage{amsmath} \begin{document} \begin{equation} \bm{\tilde{T}}_{(2,1)} = \begin{...
1
vote
0answers
14 views

Matrix in table problem - payoff matrix [duplicate]

I want to recreate the following payoff matrices: I tried for several hours now but I can't manage to recreate it. My main issue is to get the large brackets in the table. Thanks in advance
1
vote
2answers
43 views

How to automatically compute space between the dots in \hdotsfor

If you take a closer look at the included picture, you will notice the two vertical dotted lines are crooked and they are caused by the \hdotsfor[6]{5} \\ (see below MWE). So, is there a way to ...
0
votes
1answer
22 views

Typesetting pmatrix inside a tabular [duplicate]

Can I somehow make a pmatrix play nicely with a tabular environment? I tried using \def\arraystretch{1.5} but it made everything bigger. Here's a minimal example that shows my problem. I'm using ...
2
votes
1answer
40 views

Length of matrix delimiters using TikZ

I'm trying to explain the Sarrus method and to draw the lines between nodes I'm using the tikz and matrix packages. However, when the delimiters are not parentheses but vertical bars (and also ...
2
votes
0answers
44 views

Vertical Alignment of Matrices with spalign Package

I am using the spalign package (http://ctan.math.washington.edu/tex-archive/macros/latex/contrib/spalign/spalign.pdf) to typeset matrices and systems of equations. Basically it just lets you use ...
0
votes
1answer
31 views

Lines inside matrices [duplicate]

How could I produce such an image in code? I'd also like to draw vector arrows by the end of the lines, in order to see the order of the calculations. I saw a TikZ solution on other answer that didn'...
4
votes
0answers
53 views

Brackets with the same linewidth in ConTeXt

I refer to the same situation as @tommsch at Brackets with the same linewidth but in ConTeXt instead of LaTeX. In ConTeXt the two first matrices are clean but the third one has the same problem as @...
9
votes
1answer
152 views

Brackets with the same linewidth

I want to make a matrix whose entries are matrices of different size. If I use \left[ and \right] for the entries, the line-widths of the brackets are unequal, when the inner matrices are of uneven ...
3
votes
1answer
87 views

How to scale a TikZ matrix?

I have the following matrix: which is obtained from the following code: \usetikzlibrary{patterns} \usetikzlibrary{matrix,decorations.pathreplacing,calc} %opening \title{} \author{} \pgfkeys{tikz/...
2
votes
1answer
57 views

smallmatrix between brackets `[]` instead of parentheses `()`

I'm trying to write a math cheat sheet and have to write matrix in a compact way. I saw a very nice piece of answer there. What I want to do know is to set the matrix in brackets [] instead of ...
0
votes
1answer
47 views

How to make these type of matrices?

How to make these type of complicated structures? I searched online but could not find any resource or examples.
0
votes
2answers
80 views

Creating a block matrix

I want to create the following block matrix So far I have obtain the following matrix \[ \renewcommand{\arraystretch}{1.3} \left[ \begin{array}{c@{}c:c:c:c:c:c} & \pmb{\Phi}_{1} &...
-1
votes
2answers
83 views

partitioned matrix with row and column label

how can I create the following matrix with the array environment? I don't have an idea What I have got is this $$ \left[ \begin{array}{c|c|c|c} \Pf_{AA} & \Pf_{AB} & \mathbf{0} & \...
1
vote
2answers
29 views

how can I align matrices side by side and adjust width with the sheet?

I have these matrices and I want to align them side by side, two matrices in the first row and the other two in the second row (see an example in the picture). I also want to put the name of the ...
1
vote
1answer
110 views

Typesetting matrix multiplication

Here's a very general question: how would you guys write out a tutorial on matrix multiplication? Maybe with indicative arrows in order to show which line associates with its correspondent column, I ...
2
votes
1answer
43 views

Drawing dashed border matrix with tikz

I need to draw a matrix such that there is dashed line between each column and row. This is my code just to start, but the result is not good. As you see the second horizontal line is not direct and ...
1
vote
1answer
22 views

How to add a tag to each row and column of a matrix

I need to assign a tag to each row and column of a matrix. Currently, I have only figured out how to create the matrix: \begin{align*} \begin{bmatrix} \{q_0\} & \{q_0, q_1\} \\ ...
1
vote
2answers
42 views

Latex label right and left side of augmented matrix

How do I label both the right and left side of a augmented matrix ? begin{document} \[ \left[ \begin{array}{ccc|c} a & b & c & d\\ a & b & c & d\\ a & b & c &...
0
votes
1answer
30 views

How can I typeset the following nested matrices?

Note that it has to be square brackets. The big A can be normal size if necessary as long as it's still centered on the left. I could also live with it being below the outer matrix annotating the left ...
1
vote
1answer
24 views

How to create the correct formatting for T(n) time complexity notation of two outcomes.

How can i create the following notation from Introduction to Algorithms, Cormen, et al, i've been trying the following, but the Omega is indented and the \textnormal is quite sketchy in my opinion, is ...
6
votes
4answers
510 views

Empty elements as dots in matrix

I need to create a determinant (vmatrix) as shown in this picture. So, I wrote a simple LaTEX file for testing purposes as follows: \documentclass[a4paper,10pt]{article} \usepackage{amsmath} \begin{...
3
votes
2answers
19 views

Conditional within align environment not resolving

I try to use a shortcut for setting matrices with different brackets. My solution works fine in displaymath and equation environments. However, as soon as I try to use it within align, there is an ...
1
vote
3answers
96 views

Put additional features for elementary row operations in latex

During preparing a note about elementary row operations, I did the following as similar as I had found through the site: \documentclass[a4paper,12pt]{book}‎ \usepackage{amsmath,amssymb,amsthm,...
4
votes
2answers
109 views

Add annotation text below a matrix

I already have this matrix: \[ \left[ \begin{array}{ccc} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{array} \right] \] But I would like to ...
5
votes
1answer
52 views

How to write Column names (C1, C2, C3) below each column?

We can write Row names (R1, R2, R3) in each row How to write Column names (C1, C2, C3) below each column? \documentclass[10pt,dvipsnames,svgnames]{beamer} \setbeamertemplate{navigation symbols}{} \...
2
votes
1answer
19 views

Error while using cellcolor

\begin{block}{|ccc|} is not working while using cellcolor \documentclass[10pt,dvipsnames,svgnames]{beamer} \setbeamertemplate{navigation symbols}{} \usepackage{amsmath,mathtools} \usepackage{colortbl}...
0
votes
2answers
75 views

typeset conjugate matrix in LaTEX

The other day I was reading a rather old math book. I noticed it uses a different typeset style to represent a conjugate matrix as shown below in the attached picture. Is there a way to do this in ...
4
votes
1answer
414 views

3D matrix visualization, like in Python

I want to create something like the following, however I can’t add red brackets and the commas. This is my code: \[ \left[\left[ \begin{array}{ccc} 0 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & ...
0
votes
2answers
52 views

What is the problem in this code?

\begin{doublespace} \left( {\begin{array}{*{20}{cccc}} {\cosh \left[ {2t} \right]}&0&{\sinh \left[ {2t} \right]}&0\\ 0&{\cosh \left[ {2t} \right]}&0&...
8
votes
1answer
189 views

Double backslash on last line of matrix

Is \\ necessary on the final line of environments like matrix, align, and gather? For example, with amsmath, \[\begin{bmatrix} 3 & 1\\ 2 & 4\\ \end{bmatrix}\] and \[\begin{bmatrix} ...
1
vote
1answer
15 views

How to have two horizontal labels on a matrix

Say I have created a matrix. And now I want to label both the columns and the rows. However, I want to have labels on both sides of the matrix. I have tried the following: \documentclass[...
3
votes
1answer
47 views

How to have a dotted line separate a matrix into upper and lower part

So, here is what I want to do: I have created a matrix C and another Matrix D. And I have labelled the columns and rows. Now, I want to join these two matrices together, keeping the labels. But I ...
13
votes
0answers
160 views

Thickness of Brackets and Parentheses

I try to make all the brackets and parentheses to have the same thickness. Normally, the thickness of brackets and parentheses depends on how many lines of array and thing you will have inside them. ...
2
votes
2answers
72 views

Unequal margins matrix

Why does my matrix have unequal margins(brackets)? \documentclass{article} \usepackage{amsmath} \begin{document} \tiny \begin{equation} \begin{matrix} \left[\rule{...
1
vote
1answer
20 views

How to generate a matrix in a box with lines separating the lines and columns?

This is what I'm trying to do, can anyone help?
4
votes
2answers
281 views

Put a circle around elements in a matrix environment

So I'm trying to put circles around 6,8,10,18 in row 1-4 respectively, however this does give me an error warning saying "missing $ inserted" \documentclass{article} \usepackage{mathtools} \...
0
votes
1answer
47 views

A matrix representation of certain matrix in LaTeX

How can we write the following statement with the matrix form in the LaTeX ? (We wish to represent it in the matrix form) By $\delta_{ij}(a)$ we mean a n by n matrices in $M_n(\...
11
votes
1answer
399 views

How to annotate matrix using tikz

so not really sure on how I can achieve this, I have tried to do it so far with tikznode and didn't get it to look like I wanted, granted not really sure of what I'm doing. This is the output I'm ...
1
vote
1answer
36 views

Matrix brackets not appearing when typeset in the typewriter style

I need to display all the math in the typewriter style, so I used mathastext to do it, but now matrix brackets are not being displayed. Everything else works fine as far as I can tell. Here's my code:...
0
votes
1answer
40 views

How to align in smallmatrix?

I want to right-align everything, but it does not seem to work inline: \documentclass[12pt]{article} \usepackage{a4wide, fancyhdr} \usepackage[ngerman]{babel} \usepackage[T1]{fontenc} \...
1
vote
1answer
48 views

Why can I not put a fraction inside of a pmatrix? [closed]

So I'm trying to typeset a formula that contains a vector with two values that are fractions. This, unfortunately, is not working. Here is what I wrote: \documentclass{article} \usepackage{amsmath}...
0
votes
1answer
205 views

Matrix in a table

I am trying to insert a matrix inside a table, and I am looking for a good way to do this. I attach my tex following. my problem is how can I insert caption ? \begin{tabular}{|*3{>{\centering\...
1
vote
1answer
62 views

Latex for numpy boolean indexing [closed]

Assume mask is a length N boolean vector and x is a length N vector. Using numpy fancy indexing i can write: y = x[mask] How can the above operation be shown clearly, formally, and concisely using ...