Questions tagged [matrices]

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

Filter by
Sorted by
Tagged with
5
votes
3answers
104 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
106 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
37 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
38 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{...
6
votes
2answers
152 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
41 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 ...
11
votes
3answers
904 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|} ...
5
votes
1answer
84 views

Drawing a matrix

I’m new to latex and I need your help with the matrix in the picture below: mwe \documentclass{article} \usepackage{amsmath,blkarray} \begin{document} \[ \begin{blockarray}{ccccc} \begin{block}{c(...
6
votes
3answers
334 views

Aligning arrays within arrays within another array

Problem The entry shows three matrices, one atop the other. Each matrix is made of three row vectors. Each row vector has three entries. Question How to present the problem so that the three ...
6
votes
3answers
624 views

Matrix decomposition

I am trying to get what's on the image: Mi example looks bigger than the one in the picture, the latter looks more compact and nicer. Also, the matrices in the picture look sharper, meaning, they ...
2
votes
0answers
53 views

The middle row of matrix and cases does not align at baseline

When I wrote a row vector in a matrix or a 3-branch function in a cases, I noticed that the middle row does not align at the baseline of the content outside. As one must be conformed to university ...
0
votes
0answers
23 views

Striking out rows and columns in a matrix with mathjax

I want to write a matrix with a row and a column striking out with blue color. I find a lot of threads about that but using tikz library, but this one is not available with mathjax. In some case I've ...
0
votes
0answers
19 views

Default state space representation matrix in latex [duplicate]

In system theory it is very common to represent a system in state space form, which consists of 4 matrices, A, B, C and D. The professors have a nice way of representing these in a general form. Now I ...
1
vote
1answer
93 views

drawing matrices using Tikz

Recently, I have been confronted with the task to draw three matrices using Tikz and to arrange them in a certain way. https://imgur.com/TzxtG6qThis is what the output should look like I have drawn ...
4
votes
2answers
83 views

bmatrix: how to align elements' subscripts?

For example with the code below: \begin{bmatrix} \mathbf{P}^-_{k} & \mathbf{C}_k\\ \mathbf{C}_k & \mathbf{S}_k \end{bmatrix} you will get a result looking like this: It is apparent that ...
2
votes
1answer
42 views

How to Rectify Weird Spacing in a Matrix Written as an Array

I have written a fairly standard matrix as an array since I wanted to have a matrix within it. Typeset as follows: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{...
6
votes
2answers
258 views

Show sparse matrices like chessboards

I am trying to display sparse matrices like chessboards, where white places indicates 0 entries and black ones non-zero entries (in this case matrices are boolean so every non-zero entry is a one ...
3
votes
1answer
48 views

Aligning Matrices? [closed]

How would I align matrixes more correctly? I tried to use array with filling top cells and left one at the bottom, but it doesn't really work. Currently its implemented as $ \begin{bmatrix} 400. &...
1
vote
3answers
35 views

How do I separate a column with a line within a matrix? [duplicate]

I'm trying, without success, to separate a column or a row inside a matrix. What should I do in order to get the matrix in the picture?
7
votes
2answers
101 views

How do I partition a matrix into blocks and replace zeros with dots?

I am using this command \begin{equation} W = \left( \begin{array}{ccccccccc} 1 & 0 & 0 & 0 & -1 & 0 & 0 & 0 & -1 \\ 0 & 0 & 0 & 0 & 0 & 0 & ...
1
vote
1answer
43 views

Having trouble regarding matrix

How can I draw this matrix? since I’m new to LateX, it is very hard for me.
2
votes
3answers
202 views

How can I reduce the size of matrix?

How can I reduce the size of below matrix? (i.e. this matrix is wide, i want to reduce the distance of entries.) \documentclass{article} \usepackage{mathtools} \usepackage{blkarray, bigstrut} % \...
7
votes
1answer
83 views

nicematrix \ddots has different performances in different documentclass

When I use \documentclass{article}, just like (no problem) \documentclass{article} \usepackage{nicematrix} \NiceMatrixOptions{transparent,nullify-dots} \newcommand{\underbracedmatrix}[2]{% \left(...
3
votes
2answers
75 views

Align many matrices and operations so it's more beautiful

I have the following matrices, I'd like to align them under each other more beautifully. Can anyone recommend a good way to do this? $ \left[\begin{matrix} 1 & 1 & 1 & 6z-2 \\ -1 & 2 &...
2
votes
2answers
28 views

Aligning an array with text beside it

I am trying to create a 'matrix' using the array environment. I have multiple of these lines each with text besides it of varying length. I would like to have the array aligned; however, in example ...
1
vote
1answer
23 views

How do we put labels to this matrix as shown in colors?

The code that I am currently using is below \begin{equation*} \mathsf{L} ~~=~~ \begin{bmatrix} 1 & 0\\ 0 & -1\\ 1 & 1\\ 1 & 1 \end{bmatrix} \end{equation*}
5
votes
2answers
111 views

How to get my matrix to fit inside the width of the text block?

New to LaTeX here. This is what I have so far: \documentclass[11pt]{article} \usepackage{amsmath} \begin{document} $$ A = \begin{bmatrix} 0 & \cos(\theta_{1})\sin(\phi_{1})\sin(\tau_{1}) & ...
4
votes
1answer
62 views

How to center multi column multi row environment in matrix

Using this I was able to create a big zero but how can I center it? I'm a bit lost on the horizontal space. How can I center the 0_{3 \times 3} in this matrix. My code: \documentclass{article} \...
1
vote
1answer
49 views

Align many matrices the best way possible?

It's my first assignment in linear algebra and working with matrices. How would you align matrices like below the best way? Code below: \newenvironment{sysmatrix}[1] {\left(\begin{array}{@{}#1@{}}} ...
3
votes
1answer
72 views

Alignment of matrices with annotations on the right side

I have a problem with aligning matrices with annotations on the right side. I need the annotations to show the operations I used. To show the operations I first used the gauss package. Unfortunately ...
2
votes
2answers
35 views

How to generate row vector command from this code

I found following code at Matrix in small size \documentclass{article} \usepackage{graphicx,amsmath} \newcommand{\colvec}[2][.8]{% \scalebox{#1}{% \renewcommand{\arraystretch}{.8}% $\begin{...
1
vote
1answer
84 views

Beautiful matrices in latex when having bigger equations (alignment) [closed]

I'm new to LaTeX and was wondering if there is a more beautiful way to have the matrices aligned than below? Below is a sample code from the picture above: \begin{alignat*}{2} &\!\begin{aligned} ...
1
vote
2answers
63 views

How to draw this special matrix with horizontal line and vertical line in it?

I have tried with blockarray like \begin{align*} B= \left[\begin{blockarray}{ccccc} a_{s_0} & a_{s_0+1} & \cdots &\cdots &a_{s_0+n}\\ %\begin{blockarray}{cccccc} %\begin{block}{ccccc|...
1
vote
1answer
28 views

Why left alignment not working

Here is my code \begin{align*} \underline{\mathbf{r}}_k = \left[ \begin{array}{ccc} &r_{k}^{} \\ &r_{k-1}^{} \\ &\vdots\\ &r_{k-I_1I_2+1}^{} \end{array} \right],%...
5
votes
4answers
365 views

How to write a column outside the braces in a matrix?

I would like to produce the following matrix : : My code is below which only produces the matrix without the additional column. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{...
2
votes
1answer
59 views

Is there a simple way to create a cross-shaped array in ConTeXt?

According to https://en.wikibooks.org/wiki/LaTeX/Mathematics#Matrices_and_arrays, the following code creates an array that has a cross-shape, with four items centered in each quadrant. \begin{array}{...
2
votes
2answers
344 views

How to get a single big right brace?

I am trying to make the right brace cover the whole matrix like the `\overbrace'. Is there a way to do this? \documentclass[reqno,12pt]{amsart} \usepackage{amsmath,mathtools,amssymb} \usepackage[top=...
0
votes
2answers
48 views

fraction of matrix

If we need an equation with matrix and fraction, the most evident code is L(z)= \frac{\bordermatrix{& & & i & & \cr & 0 & \dots & 1 & \dots & ...
5
votes
2answers
124 views

How to write dimensions below a matrix

I would like to write the dimensions of a matrix below the matrix itself, but I managed only to either: write the dimensions below the matrix with underbrace (see matrix A in my code) write the ...
1
vote
1answer
52 views

Summation of matrix elements / table cells

Using the following code \documentclass{beamer} \beamertemplatenavigationsymbolsempty \usepackage{verbatim} \usepackage{tikz} \usetikzlibrary{calc, fit, matrix} \begin{document} %begin matrix autofit ...
3
votes
2answers
72 views

representation of vector and matrix in latex

i'm working on my latex thesis and i want to represent this equation, matrix is upperCase letter with 2 lines under it, and vector just one line below, see the picture attached can someone help me ...
6
votes
2answers
630 views

How to draw a nice diagonal matrix?

How to typeset a nice looking diagonal matrix? I find myself, once again, fiddling with phantoms and running raiseboxes to get an aesthetic result. This kind of micromanagement is bad practice, but ...
1
vote
1answer
70 views

Three matrices side by side error in LaTeX

I'm trying to align three matrices side by side in an equation with LaTex, and I keep getting many errors. I'm a beginner to LaTex so please don't send to a similar question because I'm confused about ...
0
votes
0answers
30 views

Alignment of rows in a diagram

For example, in the following diagram I want to allow the rows as in the picture below (i.e, so that m in the bottom row aligns with the top of the fraction it is adjacent to, and so that the top row ...
3
votes
1answer
32 views

Removing outer parenthesis in a diagram

When I try to remove the outer brackets in the following diagram, by removing the first occurrence of \begin{pmatrix} and the last occurrence of \end{pmatrix} I get the error misplaced alignment tab ...
0
votes
1answer
31 views

matrix with its minors highlighted [duplicate]

I have to highlight the ith row and jth column which are removed from a matrix to form its minor as depicted in the picture My try is this, but I don't know how to highlight.. \documentclass[...
2
votes
2answers
44 views

Renew arraystretch only inside matrix environment

I am using \renewcommand{\arraystretch}{2.5} in my arrays to produce nice tables. But this is affecting also matrix environments. Supposedly one can redefine the \arraystretch locally inside each ...
0
votes
1answer
43 views

Arrow pointing on two rows of matrix

How to create an arrow which points on two adjacent rows of matrix (as in picture)?
-1
votes
2answers
30 views

Writing matrices with a variable name coverin some rows and some columns inside the matrix

]1 How can I write matrix equations like as shown in the picture? I need augmented matrix with vdots and a variable name inside the matrix which covers multiple rows and columns of the matrix.
1
vote
2answers
46 views

Aligning matrices across examples

How can I align the two identical blocks in the following (the blocks consisting of rows with words in)? \documentclass[11pt]{beamer} \usepackage{pgfpages,amsmath,amssymb,mathtools,color, graphicx, ...