# Questions tagged [matrix]

Questions on the manipulation of matrices in Mathematica.

3,579 questions
Filter by
Sorted by
Tagged with
307 views

### Abrupt increase of evaluation time of MatrixExp

I test MatrixExp with different matrix sizes. When its dimension is smaller than 1435*1435, the time consumed is not much. But when it goes to 1435, the time increases a lot. ...
• 173
52 views

### How do I implement the new VectorSymbol and MatrixSymbol with numeric data?

This post by @xzczd sent me down the rabbit hole trying to use numeric data with the portfolio optimization example in the Documentation for VectorSymbol Here is the code in the documentation ...
• 940
1 vote
99 views

### Vector and matrix "indices" for physics calculations

I am trying to do a simple quantum mechanical calculation that involves both vector and spinor indices. Abstractly, the calculation of the vector $\vec{v}$ looks like the following: The right-most ...
• 199
64 views

### How to convert a $2 \times 2$ matrix with entries of $4 \times 4$ matrices into a regular $8 \times 8$ matrix

I have tried to create the following matrix $$\begin{bmatrix} 0_{4} & \mathbb{I}_{4} \\ \mathbb{I}_{4} & 0_{4} \end{bmatrix}.$$ I have used the following code ...
• 629
119 views

### Central element of matrix

Let we have $(2\cdot r+1) \times (2\cdot r+1)$ matrix mat. Is there a better way to extract it's central element, rather than ...
• 1,894
1 vote
65 views

### Mathematica isn't returning identity matrix when multiplying matrix by its inverse [closed]

I'm trying to solve a coupled system of ODE's. I'm trying to decouple my equations by diagonalizing a matrix. Here's my code: ...
67 views

• 143
1 vote
100 views

### Use Mathematica to Implement Blahut–Arimoto Algorithm (Part: Algorithm for Rate-Distortion)

Try to use Mathematica to implement Blahut–Arimoto algorithm (here we just focus on the part of computation of Rate-Distortion). Here are some reference code snippets: Python The algorithm looks ...
• 1,875
1 vote
105 views

### Use Mathematica to Implement Blahut–Arimoto Algorithm (Part: Algorithm for Channel Capacity)

Try to use Mathematica to implement Blahut–Arimoto algorithm (here we just focus on the part of computation of channel capacity) Here are some reference code snippets: MATLAB(a) MATLAB(b) Python The ...
• 1,875
195 views

### Why is Mathematica not simplifying this matrix?

I have trouble simplifying the following matrix ...
• 143
461 views

### How can I build a symmetric matrix of up to 100?

I have a square matrix of 100 elements in the form: A = {{a^0, a^1, a^2, a^3,...,a^99}, {a^1, a^0, a^1, a^2,...,a^98}, {a^2, a^1, a^0, a^1,...,a^97}, {a^3, a^2, a^1,a^0,...,a^96}...{a^99,a^98,...,a^2,...
71 views

### Solving a first order linear matrix differential equation

I am struggling in solving the following differential equation (with B and g real numbers) ...
• 143
105 views

### Simplification of arrays of a matrix

I want to simplify the arrays of a matrix, first I tried to define my constants then used "FullSimplify" but it does not work. Please see the screen shout. ...
20 views

### Is it possible to find a closed-form expression for determinant of the $k+1$-dimensional three-diagonal matrix whose entries obey particular rules?

I have this $k+1$ dimensional three-diagonal matrix in which $k=0,1,2,3,...$. I want to compute its determinant. Of course, for each fixed $k$ it is easy to compute the determinant. My question. Since ...
• 1,169
1 vote
72 views

### Retrieving only first function in matrix ODE using NDSolve

I have a very stupid question, but I don't use Mathematica very often, so here it goes: I'm trying to solve some "matrix" ODE using NDSolve. The matrix in ...
70 views

### Inconsistent solutions in two representations

Consider the following differential equations: ...
• 143
98 views

### How can I extract a matrix and vectors of coefficients from this quadratic expression?

Consider the following expression (x-y+a)^2 + (x-z+b)^2 // Expand The result is ...
• 553
142 views

### How to solve a matrix differential equation $\frac{d X}{dt} = i(X Y- Y^\dagger X)$?

In eq (21) on page-5 of this article, we have matrix HEP = (\[Omega]/2)*{{-2*I, 1}, {1, 0}}; and I am interested in finding matrix ...
• 613
I'm trying to calculate the $A$ and $F$ values by using this code, ...