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}.

1
vote
1answer
65 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
27 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
26 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
27 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
21 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
427 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
18 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 ...
0
votes
0answers
44 views

Draw matrix table in tikz flow chart [on hold]

How to draw the blocks in flow chart? First, I have to draw 3 blocks as shown in the figure below following 1 to 16 numbers in order. Now, I have to draw the interlaced 3 ARMAC blocks in the 2nd row ...
1
vote
3answers
84 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
80 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
36 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
18 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
51 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
349 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
50 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&...
0
votes
0answers
23 views

Horizontal spacing in matrix

I have installed and used amsmath package, however row entries in matrix are not separated. I can't use a dollar sign to do it, because the code is not compiled and I don't get printed matrix in pdf. ...
8
votes
1answer
172 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
38 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
103 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
67 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
241 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
41 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
350 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
33 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
33 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
46 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
49 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
51 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 ...
1
vote
2answers
66 views

Align matrix correctly

I have a matrix with "description" of the Elements on the left side and on the matrix. So the matrix is in exactly the same row as the description, but the columns are not in exactly the same line as ...
3
votes
3answers
38 views

Vertical centering of matrices inside table

I'm trying to center my table contents both vertically and horizontally. The table contains both Bmatrix and bmatrix elements. Only the first column is completely centered. The second column is only ...
2
votes
1answer
50 views

Horizontal bar in matrix to indicate row vector

To indicate that a vector represents a column of a matrix, we can write \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[paper=letterpaper,margin=1.5in]{geometry} \usepackage{amsmath, ...
3
votes
3answers
52 views

How to write between two matrix lines

I want to write dots between two lines of a matrix. How can I do this? I need this output: with a single line of dots in the fifth column.
4
votes
1answer
179 views

tikz or how to do this in LaTex?

I am trying to get this to work in Latex, this is the output I am looking for: This is the code I have so far, but I'm not getting what I want: \documentclass{article} \usepackage{amsmath,mathrsfs} ...
2
votes
2answers
108 views

How to denote n elements in a vector?

I have a column vector with two 1's and n 2's, where n is an integer. What is a clever way of denoting that there are n 2's in the matrix? I was thinking of using like a side brace, but I don't know ...
0
votes
1answer
29 views

Vertical alignment of rows within a matrix

For a simple matrix equation as the one below, I get the matrix entries bottom-aligned instead of center-aligned. I found some fancy row editing on StackExchange that use arraystretch, vphantom, ...
0
votes
2answers
38 views

Getting missing $ inserted for equation environment containing matrices

\begin{equation} \label{4.12} \scalebox{0.6} { $\mathcal{Z}$ = \begin{bmatrix} W_{1,1,1} & \dots & W_{1,K,1} & & W_{n,1,1} & \dots & W_{n,K,1} \\ \vdots &...
1
vote
0answers
24 views

How can I list the X and Y values on the outside of a 6x6 matrix, as well as list the axis names outside of them? (see image) [duplicate]

Current 6x6 matrix. \begin{bmatrix} 1&2&3&4&5&6\\ 1&2&3&4&5&6\\ 1&2&3&4&5&6\\ 1&2&3&4&5&6\\ ...
5
votes
3answers
209 views

Align equation, matrix, and table

I need to align this equation as: I recreated it by using the equation, matrix, and tabular environment. \begin{equation} \hat{J}_x \leftrightarrow \frac{\hbar}{2} \begin{pmatrix} \begin{tabular}{ ...
2
votes
1answer
29 views

Having trouble in matrix creation

I want to write down this algorithm in latex I write down the code in Latex. This is my code: \begin{enumerate} \item Algorithm EIF\_ initialize($ u_{1:t}$): \item \begin{gather}\begin{pmatrix} \...
3
votes
2answers
29 views

Horizontal alignment on bmatrix environment

I'm writing a report that contains a lot of matrices. At some point in the text, I've written the following code EDIT: as I've been told, I'll upload a code that better represents the problem I'm ...
0
votes
1answer
65 views

Matrix LaTeX \multirow and multicolumn

someone can help me to write this matrix. Thank you in advance
0
votes
1answer
49 views

Is it possible to include a equation in my own bibtex files??

Is it possible to include a equation in my own bibtex files?? I create a bibtex file in which I expect some matrix could be contained. Thanks a lot.
4
votes
2answers
458 views

Matrix writing goes wrong

I want to write down this matrix in my latex document My code for that is \begin{document} $$ F_x= \quad \begin{bmatrix} 1 & 0 & 0 & 0 & ... & 0 \\ 0 & 1 & 0 & 0 &...
1
vote
1answer
59 views

Matrix image with shattered glass effect

I have a matrix whose primary dimension is infinite and want a way to reflect this in the matrix diagram itself. The following image is not what I want, but it illustrates the jist. I would prefer to ...
0
votes
0answers
71 views

How to use more than 10 rows in bmatrix?

I have a 16x16 matrix which I want to display. \[ M= \begin{bmatrix} 10 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & ...
6
votes
1answer
158 views

Tikz Matrix: Nodes are not 'in-a-row'? [duplicate]

I am using a matrix for node-positioning with a fixed node witdh. However, as some nodes contaning more than one line of text some nodes are shifted in y-axis and I don't know why or how to fix this. ...
0
votes
1answer
63 views

tikz pgf - Add background color to specific cells of a Matrix

Hi i'm interested in how to add background to specific cells of a matrix. I already know a bit about how to build a matrix, my given code looks like: \usepackage{tikz} \usetikzlibrary{arrows, fit, ...