# Tagged Questions

Questions on the manipulation of matrices in Mathematica.

179 views

### Do not expand matrices in Mathematica calculation

Here is an example of a problem I'm having. Consider that I have defined: omega={{p[t]},{q[t]},{r[t]}} x={{a},{b},{c}} R={{1,2,3},{4,5,6},{7,8,d}} What I would ...
389 views

### Can't find the eigenvectors of a simple 2x2 matrix

Bug introduced in 8.0 or earlier and fixed in 10.3.0 Why can't Mathematica find the eigenvectors of this matrix? ...
88 views

### Calculating a multiplication of large number of matrices takes a long time [duplicate]

I have a multiplication of matrices, say M1.G1.M2.G2.....Mn.Gn, here n may reach 100. M and G are 4 4 matrices and their elements are function of s. Mathematica takes so long to perform this ...
147 views

### How can I force the use of sparse diagonalization methods?

When I evaluate the Eigenvalues function on a very large (e.g. 2^16 x 2^16) sparse matrix, Mathematica says something like: Because finding 65536 out of the ...
113 views

### Transposition of state space form of a transfer function

How can I transpose the output of state space model in Mathematica? trying the following code would transpose the top right symbol s instead of the matrices. ...
106 views

### Matrixform ndsolve for mobile robot dynamic equations

Error is: NDSolve::ndsdtc: The time constraint of 1. seconds was exceeded trying to solve for derivatives, so the system will be treated as a system of differential-algebraic equations. You ...
84 views

### multiplication of 4*4 matrices whose elements are function of x and y [closed]

I have a matrix 4*4 M whose elements are a function of x and y. I would like to multiply this matrix for different values of x and y, say M[1,1].M[2,2]......M[n,n]. How I can do it?
107 views

### Problem with NDSolve and Sign

If c1 cnd c2 are zero, the code responds very well; but if one of c1 or ...
114 views

### Extract Transfer Matrix from TransferFunctionModel

I have a MIMO transfer function model, and I'd like to know how to perform arithmetic on this model. For instance, to see the difference between two systems' outputs for arbitrary inputs, I'd like to ...
104 views

313 views

### Simple Matrix multiplication takes very long

Bug introduced in 10.1.0 and fixed in 10.3.0 I came across some strange behaviour during a computation involving matrices with symbolic values. It is reproduced below. Multiplying a random 30x30 ...
80 views

### Displaying a matrix with integral entries

I have a matrix nxn with coefficients a[i,j] like: a[i,j]=NIntegrate[T[r], {r, -le, le}] - NIntegrate[T[r] Abs[r]/le, {r, -le, le}] I can solve the matrix but I ...
30 views

### Function to be used for spectral decompostion of matrix [duplicate]

Can anybody please help in finding out what is best way to do spectral decomposition (or Eigen decomposition) of the matrix. The details of Eigen decomposition can be found in attached link 1. https:/...
66 views

### Getting an approximate analytical form for eigenvalues of a matrix

I have a 20x20 matrix: ...
85 views

### MatrixRank of a large but sparse matrix

I want to find the rank of a very sparse, quite rectangular matrix mat, but I'm running out of RAM (I have 16 GB) if I try to use ...
171 views

...
115 views

89 views

### Eigenvalues function not producing expected results?

I'm running into a strange issue when trying to compute eigenvalues of a 2x2 matrix for graphene. If I "manually diagonalise" by multiplying the two off-diagonal terms together and taking the square ...
34 views

### How to get simultaneous eigenvectors of commuting matrices? [duplicate]

So let's say there are two square matrices A and B that commute (AB-BA=0). This implies that there must exist some complete set of vectors that are eigenvectors of both A and B. Is there any way to ...
49 views

### How to get Complement function working in a For loop? [closed]

I've been working on a piece of code that will delete small components from a nested uneven matrix (n pages, n rows, 3 columns), by deleting the pages with less than ~30 rows. However, I've notice ...
47 views

### Can I rely on the ordering of the adjacency matrix? [closed]

Suppose I have created a Graph[{1,2..n}, {1->3, etc}], and I take the adjacency matrix of that graph. Can I rely on the fact that the i-th entry in the graph is the i-th node in the matrix? Or maybe ...
58 views

### Does a matrix need to be rationalized when calculating MatrixExp? [closed]

I have a sparse matrix, L, and need to calculate its exponential, MatrixExp[L t], where t is ...
272 views

### Having trouble translating Matlab fsolve` into Mathematica

I searched the site and found that someone said FindRoot is equivalent to fsolve, however, without proper options, ...
234 views

### Matrix with known entries but unknown size [closed]

I am trying to perform some calculations with a matrix that has let's say size N but unknown, please How can I write this in mathematica?
149 views

### How to tell Mathematica that my variable is a scalar

In my calculations I have these combinations PauliMatrix[1].f PauliMatrix[2] where f is a scalar function. The result is as ...
201 views

### How to produce a matrix plot from 3 matrices a, b and c following RGBColor[a[[i,j]],b[[i,j]],c[[i,j]]]?

I am trying to produce a single-plot from 3 matrices, let's say: ...
103 views

### How does one initialize large arrays in Mathematica with a structured format? [closed]

I want to create a 10 by 10 matrix that increases by 1 every unit across like: 1 2 3 4 5 6 7 8 9 10 11..... Is there a function that does this without having ...
120 views

### Challenging matrix sorting request?

I have an application in mind, and I need to do the following analysis, but am having a high degree of difficulty conceptualizing it in terms of syntax. I understand what I want, but cannot seem to ...
166 views

### Mathematica error code 0x00000171

I'm getting above error code with a Trap 132 indication when attempting an ArrayPlot of a complex 130000 x 2048 matrix. Using Mathematica 9.0.1 with Mac OS 10.10.3 ...
112 views

### Extracting a time series from a sound object

After importing a sound file, how can I generate a time series (preferably as an $n\times 1$ matrix) which gives the intensity at equal time intervals?
657 views

...
115 views

### Unexpected inefficiency when calculating matrix product by Dot

There is an unexpected inefficiency when I calculate matrix product by Dot. The only relevant part of my code is presented as follows: ...
89 views

### Null space of a stochastic matrix [closed]

I want to calculate NullSpace of a matrix m - IdentityMatrix[n]. Normally I would do it with ...
259 views

### Pauli matrices — simplify expressions without printing out the raw matrix

Squaring a Pauli matrix results in the identity matrix. These bits of documentation (weakly, to a Mathematica-newbie like me) imply that some algebraic identities that link the Pauli matrices ...
38 views

### Why is there a different eigenvector for the same matrix? [duplicate]

I have a matrix that depends on two variables x and y. Matrix[x,y] When I make x=-.25*(1 - 1/3) + .25*(1/3) + .25 y=0 I ...
446 views

### How do I create a triangulated surface from points?

I have a set of points in a nx3 matrix and I would like to convert them into a surface, so that I may calculate its surface area. The function ListSurfacePlot3D creates the surface how I want it. ...
252 views

### Matrix Plot: How to Apply color function to only a region of the plot

I want to make a matrix plot where a color function is applied to a region of a matrix. Those matrix elements which were not in the region specified should not have any color associated with them, and ...
74 views

### How to specify positions in a matrix by an array?

If I have an array of sets of points such as pts = {{2,4},{1,3},{5,7}} Is there any super short command to use those pairs to output their respective elements in ...
124 views

### How do I store Eigenvalues of a 14*14 matrix in a For loop into an array and then plot that array? [closed]

I have a matrix 14*14 that is dependent on parameter a. How can I plot eigenvalues of the matrix according to varous values of a?
260 views

### Add values from a list, at positions from a list, to a matrix

I'm investigating matrix assembly and one of the things I'm trying to do is add specific values to a larger matrix based on a list which is essentially defining connectivity of nodes. For example: ...
56 views

...
201 views

### Normalized, symbolic Eigenvectors without abs(), sign() etc

I'm trying to compute the normalized eigenvectors of a matrix M = {{0, 0, 0, 0}, {0, 0, M5, 0}, {0, M5, 0, M4}, {0, 0, M4, 0}} If I try Normalize ...
50 views

### vector product defined on kronecker delta [duplicate]

I have some vectors such as : a={{0}, {0}, {0}}; b={{1}, {1}, {1}}; c={{1}, {1}, {0}}; I wanted to product a by ...