# Tagged Questions

Questions on the manipulation of matrices in Mathematica.

203 views

### Incorrect Left and Right Eigenvectors in Mathematica

I'm trying to find the Left and Right Eigenvectors of a pretty straightforward matrix, but Mathematica doesn't seem to be able to do it for even a 200 dimensional matrix. Background: Given an ...
180 views

### Finding eigenvalues in Mathematica: why so slow?

I am trying to find the eigensystem of a large sparse real symmetric matrix, and I only need the lowest 40 or so eigenstates. The relevant code is as follows: ...
128 views

### Constructing an arbitrary dimensional matrix with a certain rule

I want to construct the following matrix $M$ of dimension $(N+1)\times(N+1)$ with the following rule (for arbitrary N). Below, in the subscript, as usual, the 1st index gives the row and the second ...
34 views

### Encoding/Decoding matrices as integers, integers as matrices [closed]

I want to convert large binary matrices of m x n dimensions into integers, and then to convert these integers to the original matrices. I attempted the following: ...
66 views

### Monitoring a matrix with changeable elements as Manipulate in plotting [closed]

If we remember, Mathematica has an ability to show a Psudo-window of plots for monitoring the effects of some changeable parameters in the functions. For example ...
98 views

### diagonalization function

If we have a matrix m which is n*n, how can I do mm=U^dagger m U which is a transformation ...
116 views

### plotting eigenvalues with devoted level coloring

I am about to plot eigenvalues of a matrix versus varyingj's. ...
72 views

### Constructing a particular Toeplitz matrix with a certain rule

I want to construct a Toeplitz matrix in Mathematica. Usually it is done in Mathematica using the following command: ToeplitzMatrix[{a,b,...},{a,y,...}] I want ...
83 views

### Flipping random elements in a matrix

I'm still a beginner with mathematica so maybe the solution is obvious, but for some reason my code that worked fine earlier doesn't work now. I haven't changed anything about it. I've restarted ...
35 views

### What is the function “oneflag_：0” in this expression？ [closed]

The first function Pivotdown can zero out all entries in a column below a desired location. But l don't know the function of “oneflag _0".
60 views

### Generate a simulated covariance matrix

I am working on a problem where one of the input variables is the level of covariance between the entries in a particular matrix. To simulate this problem in Mathematica, I will need to feed my code ...
62 views

### Computing the logarithmic spectral norm rapidly

I wish to compute the logarithmic spectral norm of a square matrix $A$, which is defined by $$\mu_2[A]=\lim_{t\downarrow0}\frac{\|I+tA\|_2-1}{t}.$$ Hence, I simply code ...
240 views

### Make a vector of sums of matrix rows

I have a matrix in Mathematica: ...
292 views

### How can I create a random symmetric matrix in this way?

The most straight forward way for me to think about is like this: ...
34 views

### Picking some elements of a matrix and generating another matrix [duplicate]

If we have a nested matrix as: start={ {{1, 2, 2, 3}, {1, 1, -2, 1}, {3, 2, 2, -I}, {1, 2, 0, -I}}, {{3, 4, 4, 0}, {1, 1, 4, 1}, {3, 3, 4, -1}, {1, 1, 2, I}} } ...
37 views

### wrong result of an iteration related to replacement and comparing

We have two nested matrix and a code for replacement following an equality as: ...
123 views

### Conditionally binarizing matrices

I want to (fastly) convert matrices with values that are <= a threshold to binary matrices. I used a call to Binarize, but I don't like the Image and ImageData conversions as they obfuscate the ...
98 views

### replacement in a nested matrix

We have a nested matrix m1 = {{{1, 2, 2, I}, {1, 1, -2, 1}, {3, 2, 2, -I}}, {{3, 4, 4, I}, {1, 1, 4, 1}, {3, 3, 4, -1}}}; we must replace the first number of ...
139 views

### Why has Version 10.3 precision reduced?

In version 7.0.1.0 and versions 10.0 and 10.1 the following is produced: ...
63 views

### Why the curly bracket? [closed]

Why are there the curly braces in the output of DY = {{Cos[ay], 0, Sin[ay]}, {0, 1, 0}, {-Sin[ay], 0, Cos[ay], 0}}; DY // MatrixForm It looks inconsistent ...
152 views

### Hasse Diagrams from Adjacency Matrix

Let's say I have a rather large adjacency matrix for a partial order relation. Say an 80x80 matrix. What is the best way to display Hasse diagram? I have tried AdjacencyGraph and it does a not so bad ...
46 views

### How to find selected elements of inverse of a banded matrix without inverting it?

Is it possible to find some selected elements of the inverse of a large sparse matrix without inverting it? For example consider this Hermitian matrix (as a general case). ...
91 views

### Partial comparison between lists contained in larger matrices [closed]

Please presume we have two nested matrices m1 and m2: ...
52 views

### generation a nested matrix with a partly comparison of two other nested matrices [closed]

(this problem is maybe challenging because of its partly comparison) there are two nested matrices: mainmatrix1: ...
217 views

### Creating a nested matrix from two lists

I have a matrix and two lists: ...
230 views

### Derivative of a symbolic matrix

I need to write an elasticity equations as: {{a*∂/∂x,b*∂/∂y},{c*∂/∂x,d*∂/∂y},{e*∂/∂y,f*∂/∂x}}.{{u},{v}} where a,b,...,f are ...
48 views

### Lift and projection method in Least Squares Inverse Eigenvalue Problems [closed]

I need to implement the lift and projection method proposed by XUZHOU CHEN AND MOODY T. CHU in http://www4.ncsu.edu/~mtchu/Research/Papers/lsiep.pdf on page 7 in ...
145 views

### How to speed up filling a matrix as much as possible in a loop?

In order to find the solution of an $n\times n$ system of nonlinear equations by the method $x_{k+1}=x_k-D_k^{-1}f(x_k)$ where $D_k$ is an approximation of the Jacobian and defined by ...
69 views

### LinearSolve on non-square matrices?

I just came across a strange behaviour for LinearSolve (on Mathematica 8.0.0.0). Consider the following definitions: ...
99 views

### Product of $N\ 2 \times 2$ matrices and subsequently solving an equation dependent on the product

I have $N\ 2 \times 2$ matrices, each one containing one variable energy which may be complex. I want to muliply them all together to a single matrix ...
122 views

### Easier way to calculate Taylor remainder in 2nd order series

At the moment I have implemented the code for a Taylor 2nd order series for the function in three variables: $x_3^3+\frac{x_1-x_2}{x_1+x_2}$ The code builds on following expression: ...
336 views

### How to repeat a matrix on it's side?

I have the following matrix in Mathematica: mat = {{0,0,1,1}, {0,1,0,1}} I want to repeat this matrix N number of times on the side. For example if N = 3 then ...