Questions tagged [matrices]

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

Filter by
Sorted by
Tagged with
0
votes
2answers
17 views

Labeling the rows of a matrix with letters

How can I label the rows with A B C D E letters instead of numbers? I tried with \alph but it did not work. \documentclass{article} \usepackage{xcolor} \usepackage{blkarray, bigstrut} \usepackage{...
4
votes
3answers
158 views

Increase size of square brackets

How can I increase the size of the brackets? They are not enclosing the whole matrix. \documentclass{article} \usepackage{blkarray} \begin{document} \begin{figure}[htbp] \begin{spacing}{0.5} \...
3
votes
2answers
40 views

Aligning and spaces for negative numbers and fractions in a matrix

As the title says, when I am writing my code the fractions are a little too close to eah others. \documentclass{article} \usepackage{mathtools,amsmath,amssymb,amsfonts} \begin{document} \[ \left(...
4
votes
1answer
65 views

Create projection inside matrix - tikz 3dplot

I can create two nodes in tikz-3dplot, and create a projection like view, like this : But how to create view like this(the right one- only those projection lines) ? I have created the basic, I just ...
0
votes
0answers
48 views

Dashed lines in matrix math without Tikz

Is there a way to do dashlines as separators in matrix math environment without Tikz package? I tried to use arydshln with {array}{c:c} but generates error. I have to do this This is the code I used ...
2
votes
1answer
27 views

How to vertically-centered align images and characters in pmatrix?

How can I vertically-centered align the comma below with the images? \documentclass{article} \usepackage[demo]{graphicx} \usepackage{amsmath} \begin{document} \[ \begin{pmatrix} \...
0
votes
1answer
46 views

How can I draw those line joining matrix

I'm trying to draw something like this : I have created matrix normally, from here : \begin{bmatrix} x_{11} & x_{12} & x_{13} & \dots & x_{1n} \\ x_{21} & x_{22} &...
0
votes
1answer
13 views

Change font color of whole matrix including the brackets of matrix

I want to change the font color of complete matrix including the matrix braces to red color. The MWE is given below: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation}\...
1
vote
2answers
88 views

Matrix multiplication

I have followed the suggestions in this thread to place the delimiters before and After all arrays (also tried matrix} but my file won’t compile until I delinit each matrix which doesn’t give me the ...
0
votes
0answers
38 views

Vertical lines inside matrices disappear when exporting to pdf

All the vertical lines inside the matrices disappear when i export to pdf. Any suggestions?
1
vote
2answers
57 views

A question about uparrow in a matrix

The following code displays a matrix that has the value of 1 in the cell (i,j) and the value 0 in all the other cells. The code shows the rightarrow with the label "row i" and I want to add an uparrow ...
5
votes
4answers
451 views

LaTeX matrix formatting

I am trying to create something similar to the below image. I have something, but my formatting is a little off. How can I correct the formatting and also add the W1, W2, Wn and D letters on top (not ...
2
votes
1answer
27 views

Aligning vector elements to rows of matrix (vertical alignment) in matrix-vector multiplication

When the matrix is complex and the vector is simple, the output does not look good: Code: \begin{bmatrix} \displaystyle\sum_{i=1}^M{(x_i)^2} & \displaystyle\sum_{i=1}^M{(x_i)} \\ \displaystyle\...
1
vote
0answers
26 views

Why do matrix brackets look strange when using package unicode-math?

Compare this: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation*} \begin{bmatrix} a & b \\ c & d \\ e & f \\ g & h \end{bmatrix} \...
-1
votes
1answer
45 views

Matrix with arrows [duplicate]

How can I create such a matrix with arrows in Latex?
8
votes
3answers
265 views

Matrices upper triangular alignment

I was writing an upper triangular matrix but due to large entry was unable to get in a good view. \documentclass[10pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath,mathtools} \...
5
votes
2answers
105 views

How to circle together certain entries of a matrix?

I am looking for a way to circle together the red entries of the following matrix: $$ \begin{matrix} \textcolor{blue}{[0,1]} & \times & \textcolor{blue}{[0,1]} & \times & \...
2
votes
1answer
31 views

How to align words outside matrix? [closed]

It is difficult to describe my question, so I give the picture which shows the difficults: Some words are outside of the matrix, both rows and columns. How to align them? It is better to have ...
2
votes
3answers
39 views

smallcaps in a matrix, \\ coupled with foreach loop

I wanted to make a command which would put all of my text in smallcaps and in a matrix. This is \fmold below. This gave me an error, prompting me to make a foreach loop as seen in \smallcapsify and \...
2
votes
1answer
25 views

Creating a block by block matrix indicating number of lines/columns of each block

An image is better than words sometimes, so I would like to create a matrix like this: My main problem is to put the number of lines-column using the bracket as shown here. Indeed my current code is ...
0
votes
0answers
46 views

How to draw lines over a matrix to represent Sarrus’s rule

I am trying to make this matrix with the lines over it, as the image: I know the matrix environment but I don’t know how to do this. Thanks.
0
votes
2answers
33 views

How do I put a box around a column and a row in a matrix in latex?

I have a matrix in latex and I want to put a box around the first column and another box around the first row to highlight them. Additionally it should be possible to give the highlighted fields a ...
0
votes
0answers
49 views

Is it possible to type a 273*273 matrix?

I was actually working on a project, and had to type a huge matrix (273*273). However, when writing the code, it is impossible for me to get the matrix done. The code I employ would be something like ...
0
votes
0answers
24 views

`\iffmode` fails for first token in matrix cells [duplicate]

\iffmode seems to fail for the first token in every matrix cell. Here is a minimal working example. \documentclass[margin=5mm]{standalone} \usepackage{mathtools} \newcommand{\foo}{% \ifmmode A% ...
0
votes
3answers
65 views

How to write a block matrix in Latex in the given way

How to write a block matrix in Latex in the following way: I wrote the following code: \[ Q=\left[ \begin{array}{c c c c} \textbf{nI}& \vline & \textbf{J}\\ \hline \textbf{J^T} &\...
2
votes
2answers
58 views

How to draw this particular block matrix

I need to draw the following block matrix The closest I have got is by using the following code: \begin{pmatrix} \lambda_1 & * & \dots & *\\ 0 & \lceil & & \rceil \\...
2
votes
1answer
54 views

Why does leaving a blank line in displaymath mode cause an error during compilation?

When I compile the following code everything runs with no issues: $$ \left[ \begin{matrix} 2 & 3 \end{matrix} \right] \quad \left[ \begin{matrix} 2 & 3 \end{matrix} \right] $$ However, when ...
0
votes
0answers
29 views

\vrule inside smallmatrix

I'm using \vrule in the matrix and pmatrix environments, and it works well. However, inside smallmatrix, \vrule doesn't fill all height of row. It looks that smallmatrix adds some vertical space after ...
5
votes
3answers
264 views

How to add additional space between the lines inside the matrix?

I have a matrix and a vector where lines are partially overlapped: \documentclass{article} \begin{equation}\label{eq25} \begin{aligned} &\left( \begin{array}{rrrr} 3 & -3 & 0 & 1 \\ \...
3
votes
2answers
90 views

Adding space between matrices

I am having some trouble when changing the order of the matrices. The dot product does not look very well, actually it is like it is embedded; hard to spot. How can add space between the two matrices ...
2
votes
1answer
31 views

How to write matrix and its source code using cnltx-example

I want to get output of the matrix \begin{pmatrix} \frac{1}{2} & 0 & \frac{9}{5} \\ -2 & \frac{2}{3} & -\frac{1}{4} \\ 12 & 0 & \frac{11}{7} \\ \end{pmatrix} along with the ...
1
vote
2answers
85 views

Getting matrices labels

Can you help me to get these matrices with its labels above: MWE: \documentclass{article} \usepackage{amsmath} \begin{document} \[ \underbrace{\! \begin{pmatrix} x_{11} & x_{12} &...
4
votes
3answers
69 views

Drawing matrices on arrows of a short exact sequence (commuatative diagram)

I want to draw a short exact sequence using the tikz-cd package. But I want the labels on some of the arrows to be matrices. I can´t seem to make it look good. The arrows are not approtiatly sized and ...
1
vote
1answer
37 views

horizontal and vertical dash lines in between homogeneous transformation matrix

i am new to latex and how do O write this in latex please? I just know how to write simple matrices. This matix includes both horizontal and vertical dash lines and lower row has four columns. R(q) ...
5
votes
2answers
203 views

Changing matrix style [closed]

I have the following matrices with its respective code. The attached image shows the output. Since I have to put that image into an academic thesis, I thought that my actual design is a little bit ...
1
vote
2answers
74 views

Delta-equal to symbol and matrix with dashed lines

How do i write this in latex plz
4
votes
1answer
131 views

Coloring the backgrounds of portions of a matrix

I've been looking around for some time and I seem to be having a large bit of trouble coloring the following matrix: \begin{pmatrix} 3 & -1 & -1 & -1 & 0 & 0 & 0 \\ -...
2
votes
1answer
187 views

Have two feature in matrix command

Via this link i can change the line spacing in matrix How can I increase the line spacing in a matrix? and in the second one i can create a matrix with divider lines How to add dash lines in Matrix ...
0
votes
1answer
34 views

A table with several subtables?

I'm trying to create the following table. Each subtable represents a symmetric matrix, which is why the upper part is not filled in. I'm not sure what I need is a table. Any help would be ...
3
votes
1answer
63 views

Can I make a matrix from just a parts of the cells?

Can I make a matrix from just a parts of the cells? i.e. not all the cells just some of it, like here: It possible to make something like this? Thank you!! P.S. I'm using LyX.
3
votes
1answer
35 views

macro to create Square matrix of order 4

I have created a macro to write a matrix of order 3 (square matrix) using the following code \newcommand{\matrixthree}[9]{$\left(\begin{matrix} #1 & #2 & #3 \\ #4 & #5 & #6 \\ #7 &...
1
vote
1answer
74 views

Nesting of functions not working in lualatex

Here is the code. It makes use of the file matrix.lua available at the following link. https://github.com/davidm/lua-matrix/blob/master/lua/matrix.lua \documentclass{article} \usepackage{luacode} \...
4
votes
2answers
119 views

Bug in Lualatex: not printing characters from calculation

I have the following code \documentclass{article} \usepackage{luacode} \begin{document} \begin{luacode*} local matrix = require "matrix" local complex = require "complex" function cmatrix(n) return ...
10
votes
3answers
355 views

Align the contents of a numerical matrix when you have minus signs

I have a matrix that looks like \begin{equation*} \left [\begin{array}{cccccc} 0 & 0 & 6 & -6 & 0 & 0 \\ 0 & 0 & -6 & 6 & 0 & 0 \\ 0 &...
4
votes
3answers
121 views

What is the best way to stacked subscripts for a matrix?

I use this code to generate subscript indexes for a matrix but stacked thanks to substack: \documentclass{standalone} \usepackage[utf8]{inputenc} \usepackage{amsmath} \begin{document} $(v_j^h)_{\...
1
vote
1answer
41 views

Techniques to evenly display a bunch of nodes in a tikz document

To replicate the following picture (namely the evenly laid nodes a, b, c, d -- and I could want in the future to even have multiple rows, instead of just one) one can do one of multiple things: ...
2
votes
1answer
210 views

How to type a bivariate normal distribution

How to type the following bivariate normal distribution? I am only able to type each independent matrix. But I can't connect them with a symbol"~" \begin{equation} \begin{pmatrix} \mu \\ \nu \end{...
2
votes
3answers
205 views

Adding labels to a matrix

I don't know how to add labels "ABCDE" and "12345678910". And I want to set it as a matrix and not as a table. How can I achieve that? DESIRED OUTPUT: \documentclass{article} \begin{document} \...
1
vote
1answer
44 views

Weird alignment in [closed]

For some reason, the following code compiles as shown on the picture. \begin{equation} t_{0\rightarrow1} \equiv\frac{1}{2}(X-iY) = \begin{pmatrix} 0 & 0 \\ 1 & 0 ...
8
votes
3answers
1k views

Matrices with shadows

I'm trying to draw the shadows and also the dots between the two matrices: \documentclass{article} \usepackage{amsmath} \begin{document} \centering \begin{tabular}{|c|c|c|c|c|c|c|c|} ...