# Tagged Questions

Questions on the manipulation of matrices in Mathematica.

217 views

### Are there any good mass row/column swapping functions for matrices?

I have the following matrix Keeping the 20 row and 20 column fixed (so the 21st rows and columns because I started at 0)...how do I push each row and column back one spot? I need to push the 0th row ...
266 views

### Writing code to update a large matrix?

How can I write a code to update a matrix based on certain rules? I plan on constructing a large matrix, and I cannot submit entries one by one. The rules for the matrix are as followed:  P(i,j)=...
161 views

### Express block matrix in terms of matrix basis

I'm trying to construct a function that returns the multiplication table of a matrix Lie algebra. Assuming a basis of matrices, my definitions: ...
96 views

### How can I get symbolic orthonormal eigenvectors for 3 by 3 hermitian matrix?

Using the following syntax, I can obtain the symbolic eigenvalues and eigenvectors of the following Hermitian matrix (a,b,c,d are all real parameters): ...
127 views

### Recreating in Mathematica a matrix created in Python [closed]

I need to recreate in Mathematica this matrix that I created in Python: ...
70 views

### Plotting six chosen rows of a matrix

I have a matrix,W, whose dimension is n x n, each entry is a number. I need to plot only the values of six rows, namely those ...
91 views

### Calculating a function repetitively without using a For loop

In my programme I have defined all these functions: ...
111 views

### Filing matrix by bands [closed]

I need to fill a matrix, CSI, by taking elements from an array, inverse, which is the Inverse Fast Fourier Transform of an array ...
98 views

### sparse array with list [closed]

i'm trying to populate a sparse array with lists in certain positions, i tried the following code, ...
790 views

### Writing a circular matrix

I have two square matrices, $A$ and $B$, of the same size, say, of $m \times m$. What I want is to write a programme/function of three variables, $A$, $B$ and $n$, that outputs the $mn \times mn$ ...
66 views

### How can I manipulate this list?

I performed a loop with Table where I solve a system of 4 equations that depends on two parameters: eta and p. I create two lists for each parameter as follows: <...
78 views

### Defining a function of matrices [closed]

I am translating my code from Python to Mathematica. How can I define a function similar to the following: ...
201 views

### Define a matrix depending on variable in Mathematica [closed]

I am translating my code from Python to Mathematica. I am trying to define a matrix, whose values depend on a variable chosen by the user, called kappa. In Python the code looked like that: ...
134 views

### calculating subsets of a matrix (L=40X40)

I need to calculate all $k$-possible subsets$(k:1,L)$ of matrix with size $L$. I am using subset function as following, ...
106 views

### How do I generate all $n\times m$ matrices s.t. $a_{i,j} \in {a … b}$?

Is there a fast and clean way of generating all possible $n\times m$ matrices s.t. $a_{i,j} \in \{a ... b\}$ - much like Range does in $N$? Consider for example that for $n,m = 2$, $a=0$, $b=2$ I ...
277 views

### What is the “proper” way of multiplying a list of vectors by a matrix? Why Map does not work? [closed]

I am an absolute newbie with Mathematica, so please forgive me if this is stupid, but for the life of me I can't solve this. Suppose I have a list of vectors $b_{1...n}$ and a square matrix $A$ and I ...
1k views

### Verify Cayley-Hamilton Theorem

Consider the matrix: A = {{-1, -4, -2}, {0, 1, 1}, {-6, -12, 2}} Now, the characteristic polynomial is found: ...
148 views

### Unragging a matrix

Today I ran into matrices like this one: ...
166 views

### Maximum element and its position (row,column) of matrix

Can someone help me to get the maximum element of $m\times n$ matrix and corresponding row and column $(i,j)$?
474 views

### How to insert a Matrix into a larger matrix

I have a 4x4 matrix v1 v2 v3 v4 myM={{a1,a2,c1,c2}, v1 {a2,a3,c2,c3}, v2 {c1,c2,d1,d2}, v3 {c2,c3,d2,d3}} v4 And I want to ...
83 views

### Counting and updating a subset of matrix

I have an n by n matrix and would like to count the number of sub-matrices that is equal to a given matrix. Here is my code: DWBCL creates a matrix with elements a1, a2 and c2 in it and DWBCH with b1, ...
80 views

### Filling a matrix with a list of lists

I have a list of lists with different lengthes: {{a1,a2},{b1,b2},{c1,c2,c3},...} Now I want to create a matrix the following way: ...
237 views

### Creating a matrix under conditions

I would like to create a matrix whose elements satisfy the following conditions ( Mathematica 9 ) ...
191 views

454 views

### How to build a matrix from a set of vectors and other matrices using ArrayFlatten

I want to build a 6 by 3 matrix, from the following: one vector is 3 by 1, then a matrix, which is 3 by 2. These will go to the top 3 rows. Now the bottom 3 rows, I'll have 3 vectors each is 3 by 1. ...
204 views

...
154 views

### Solving matrix equation

How can I solve the forward equation S[t]=C+A*S[t+1]*(Inverse((I-B*S(t+1)))*A for t=1 to t=10 and ...
105 views

### Find algorithm or generator formula with automated procedure and pattern recognition

I am trying to find a generator formula for the discriminant of a polynomial and believe it would be an interesting problem for the Mathematica community to know how to automate evaluation of certain ...