Tagged Questions

Questions on the linear algebra functionality of Mathematica.

0answers
43 views

Nontrivial solutions of equation

Here I have one problem how to find nontrivial solution of a system of equation. I want to choose one variable, for example X1 and to get solutions of X2(X1) and X3(X1). It is not difficult when I ...
0answers
5 views

Finding Vectors in cartesian form [migrated]

I am stuck on this question could you please help me. Find,in Cartesian form, the equations of the straight line through the point with position vector (-1,2,-3) parallel to the direction given by ...
2answers
140 views

A matrix-vector cross product

I want to do a cross product involving a vector of Pauli matrices $\vec \sigma = \left( {{\sigma _1},{\sigma _2},{\sigma _3}} \right)$; for example, $\vec \sigma \times \left( {1,2,3} \right)$. ...
1answer
85 views

Exploiting self-adjointness when changing basis

I am using Mathematica to analyze a real, self-adjoint matrix $H$ of the size $32 \times 32$, which comes from a physics problem. In the picture there is also a matrix $Q$ which commutes with $H$. I ...
1answer
39 views

Partial row reduction of a matrix

I have an $m\times n$ matrix (presumably of full rank) with $m>n$, and I would like to row reduce it, but leave the last column unreduced; that is, I want to get output on the form \$\pmatrix{ 1 ...
4answers
249 views

How to find the index of a square matrix in Mathematica quickly?

Let $A$ be an $n\times n$ complex matrix. The smallest nonnegative integer $k$ such that $\mathrm{rank}(A^{k+1})=\mathrm{rank}(A^{k})$, is the index fo $A$ and denoted by $\mathrm{Ind}(A)$. I would ...
1answer
82 views

large matrix eigenvalue problem

I need solve a very large complex matrix (not sparse and not symmetry) eigenvalue problem, e.g., 1e4*1e4 or even 1e6*1e6. How large dimensions of the matrix can Mathematica support? And, how about ...
0answers
53 views

Fast calculation of commute distances on large graphs (i.e. fast computation of the pseudo-inverse of a large Laplacian / Kirchhoff matrix)

I have a large, locally connected and undirected graph $G$ with $\approx 10^4$ vertices and $\approx 10^5$ to $\approx 10^6$ edges. Moreover I can bound the maximum vertex degree as $Q_{max}$. I ...
3answers
102 views

Compute the rank of a matrix with variable entries

Say I have a matrix like $$M=\left( \begin{array}{c c c} x & xz & w-2x \\ wz^3 & xy & z \\ y^2-z^3 & x+w & z+x^5 \end{array} \right)$$ is it possible to ask Mathematica ...
2answers
72 views

Matrix echelon/upper diagonal form

Is there a way to find the echelon form of a matrix in Mathematica? I see there is a function to find the reduced echelon form, RowReduce[], but I can't see ...
2answers
99 views

Computing distance matrix for a list

Using functional programming in Mathematica, how can I compute a distance matrix for every element in a list of matrices... The distance would be computed between the item in the list and a "target ...
0answers
101 views

Calculating the rank of a huge sparse array

By virtue of the suggestion in my previous question, I constructed the sparse matrix whose size is $518400 \times 86400$, mostly filled with $0$ and $\pm 1$. Now I want to calculate its rank. Since ...
2answers
120 views

Efficient ways to create matrices and solve matrix equations

I am attempting, for the first time, to use Mathematica to do some serious linear algebra. I would like to solve systems of equations of the form $$U_{n n'} f_{n'} = b_n.$$ I have an expression for ...
0answers
105 views

6x6 matrix NullSpace

I'm working with a 6x6 matrix. Whenever I try to find the NullSpace and FullSimplify it, I get the error No more memory ...
2answers
116 views

Defining a non-commutative operator algebra in Mathematica

I am trying to develop a function(s) to do some commutator algebra to compute the enveloping algebra and ideals of a Lie algebra. For example if I have $SU(2)$ algebra generated by $L_i$ ($i=1,2,3$), ...
1answer
98 views

Computing the sign of the real part of eigenvalues in a 3D linearized system with 3 parameters

So I have this dynamical system given by: $$\left\{\begin{aligned} x' &= a(y-\phi(x))\\ y' &= x-y+z\\ z' &= -by \end{aligned}\right.$$ where $\phi(x) = \mu x^3 - \nu x$ and $a,b,\mu,\nu$ ...
2answers
231 views

Gram Schmidt Process for Polynomials

I want to implement the Gram Schimdt procedure to the vector space of polynomials of degree up to 5, i.e. I want to find an orthogonal basis from the set of vectors $v=(1,x,x^2,x^3,x^4,x^5)$. The ...
1answer
217 views

Efficient method for inverting a block tridiagonal matrix

Is there a better method to invert a large block tridiagonal Hermitian block matrix, other than treating it as a ordinary matrix? For example: ...
2answers
154 views

Why does my matrix lose rank?

I want to check the rank of a matrix for observability, but Mathematica loses a rank if the matrix contains very large numbers. Let's say my matrix is ...
1answer
95 views

Why is EigenValues returning Root expressions?

This is the code I have: ...
1answer
62 views

Why does Eigenvalues[matrix I defined] not work? [duplicate]

This is the code I have in my mathematica notebook. I want to find the eigenvalues of the matrix I created called Hmatrix as defined below. However when I type Eigenvalues[Hmatrix] I get the Hmatrix ...
1answer
132 views

How to get the determinant and inverse of a large sparse symmetric matrix?

For example, the following is a $12\times 12$ symmetric matrix. Det and Inverse take too much time and don't even work on my ...
1answer
118 views

Interpolating a Bivariate Polynomial over a Finite Field

Let $F=GF(p)$ be a finite field, $p$ prime and write $F^\times=\{x_1,\ldots,x_n\}$. I'm trying to implement an earlier version of Sudan's list-decoding algorithm for Reed Solomon Codes ...
2answers
604 views

Solving a tridiagonal system of linear equations using the Thomas algorithm

I'm trying to write a function that can solve a tridiagonal system of linear equations using the Thomas algorithm. It basically solves the following equation. (Details can be found at the Wiki page ...
1answer
330 views

Octonions in Mathematica

Is there a package or Notebook for Mathematica that can enable me to do some numerical calculations with octonions? Maybe a way to plug-in the octonion multiplication table?
1answer
425 views

Eigenvalues and Determinant of a large matrix

Can anybody kindly explain to me what is going wrong regarding a simple problem I have? I can find the eigenvalues of a large matrix using Eigenvalues[], but when I ...
1answer
66 views

Confirming the existence of a function related to a matrix

Is it possible to get an answer to the following question in Mathematica? Let $M$ be a $n$ by $n$ matrix, is there a function $m:\mathbb{N}\times \mathbb{N}\rightarrow \mathbb{Z}$ such that ...
1answer
301 views

TensorContract of inverse matrix

Matrix inverse in mathematica If $A$ is an invertible $n \times n$ matrix, then $A\cdot A^{-1} = I$. To get this statement in Mathematica, you need the assumption ...
2answers
201 views

Speed up 4D matrix/array generation

I have to fill a 4D array, whose entries are $\mathrm{sinc}\left[j(a-b)^2+j(c-d)^2-\phi\right]$ for a fixed value of $\phi$ (normally -15) and a fixed value of $j$ (normally about 0.00005). The way ...
2answers
193 views

badly conditioned matrix (General::luc)

With some matrices I am receiving the following message Inverse::luc Result for Inverse of badly conditioned matrix (M) may contain significant numerical errors. How can I tell to Mathematica to ...
1answer
127 views

Can I reduce a matrix inequality such as $\mathbf x^\prime\mathbf A\mathbf x > \mathbf x^\prime\mathbf x$?

I'm new to Mathematica. When I do linear algebra, I wonder if I can have an inequality such as $\mathbf x^\prime\mathbf A\mathbf x > \mathbf x^\prime\mathbf x$, where $\mathbf x$ is a column vector ...
0answers
94 views

How to express this output in the form $X=A.x$?

This problem arose in my stereo vision project. I have two matrices:  A = \left( \begin{array}{ccc} \text{x1}*\text{p131}-\text{p111} & \text{x1}*\text{p132}-\text{p112} & ...
0answers
62 views

Inverse problem of Eigenvalues in DSolve

For my graduation exam I must prepare system of equations to satisfy some specific conditions. I have solutions, output 2, but I need equations eq11 and eq22. So here is an example. ...
1answer
252 views

Decoupling system of differential equations

Here I have one task and it is preparation for small exam. I solved it by hand for first case 1), but I need to check it in $Mathematica$ and to try to implement it for both cases 1) and 2) ...
3answers
85 views

Selecting terms containing some expression

Imagine I have an expression like a*k + (a^2)*b*c + b*e and I would like to obtain the term containing, for example, some power of a. In that case I would ...
1answer
102 views

How to create a large sparse block matrix

I need to generate a very large sparse block matrix, with blocks consisting only of ones along the diagonal. I have tried several ways of doing this, but I seem to always run out of memory. The ...
0answers
178 views

More efficient matrix-vector product

Dear mathematica users, In my present research I am faced with a real dense $n\times n$ matrix $A$ where $n \geq 3000$ (hopefully even more). The coefficients of this matrix are fixed, but I will ...
2answers
181 views

Compiling LinearSolve[] or creating a compilable procedural version of it

Earlier today I had a discussion with a representative at Premier Support about the 2 questions I've asked here over the past couple of days: Seeking strategies to deploy a function securely ...
3answers
233 views

Correct way to populate a DiagonalMatrix?

I would like to create a series of correlation matrices that starts with : sensMat[[1]] = DiagonalMatrix[ { 1,1,1,1,1 } ]) // MatrixForm and iterates in 0.1 ...
0answers
82 views

Not getting the required eigenvalues [closed]

I'm trying to use Mathematica to show that the eigenvalues of $U$ are $\pm\dfrac{1-i}{\sqrt{2}}$, where $U = (I + T + iS)(I - T- iS)^{-1}$ where \$ S = \left( \begin{matrix} 1 & 1 \\ 1 ...
0answers
76 views

Evaluating a function on permutations of its arguments

Say I have a function "temp" of $n+1$ variables, $y,z1,z2,z3,...,zn$. I want to test if my function has certain symmetries like swapping $y$ with square of any $z$, swapping any two of the zs, ...
1answer
107 views

RowReduce Problem

Here are two examples: RowReduce[{{3, 1, a}, {2, 1, b}}] evaluates to {{1, 0, a - b}, {0, 1, -2 a + 3 b}} but ...
2answers
437 views

Linear equation with complex numbers

I have to solve an equation of the type $$a z+b \overline{z}=c$$ with $a,b,c\in\mathbb{C}$. My approach is to set $F(z)=a z+b \overline{z}-c$ transform $z$ to $x+i y$ and then get a real linear ...
1answer
123 views

Functions that operate on symbolic matrices?

I'd like to write functions that operate on symbolic matrices, and do nothing when fed anything else. ...
1answer
157 views

Verifying and deriving basic (block) matrix identities

How can I use the new symbolic matrix/tensor capabilities to verify matrix identities, such as (1) or (2) Even better, how can I ask Mathematica to derive expressions for X, Y, Z, and U like ...
0answers
165 views

Matrix algebra vs. PrincipalComponents and Varimax/Oblimin

Using matrix algebra I can calculate loadings and scores from the covariance matrix (data matrix is column centered): ...
0answers
130 views

Parallel linear algebra with arbitrary precision

Is it possible to do parallel linear algebra with arbitrary precision within Mathematica (in a simple manner, as is done for the machine precision)?
1answer
196 views

Find an inverse matrix, regarding a parameter as real

I have the matrix ...
2answers
302 views

Eigensystem, Eigenvalue doesn't output nonreal eigenvalues

Basically I have a matrix and when I used either Eigenvalue or Eigensystem, it doesn't output nonreal eigenvalues, instead it ...
4answers
348 views

Dual-Grid Graph Paper With Mathematica?

Is there a slick way to generate the dual-grid graphs such as you can see on pages 7, 9, and 10 of this article, or this one? I've searched, but found nothing. Thanks in advance...
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 62, "mathjax_display_tex": 4, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.8872956037521362, "perplexity_flag": "middle"}