Questions tagged [linear-algebra]

Questions about Mathematica functionality related to manipulating vector spaces and linear mappings between such spaces. This includes determination of matrix properties, matrix transformations, decompositions, and factoring.

Filter by
Sorted by
Tagged with
1 vote
1 answer
77 views

Inverse of a matrix with symbolic variables

I want to evaluate the inverse of the following colossal matrix ...
user avatar
  • 393
0 votes
1 answer
42 views

How to solve this equation of n-order matrix?

Question: Let i be an n-level identity matrix and j be an n-level matrix with all elements of 1. Let n-order matrix m be $M=\left(\begin{array}{ccccc}k & \lambda & \lambda & \cdots & \...
user avatar
  • 1,365
1 vote
0 answers
88 views

Discrepancy in eigenvalues [closed]

I need to calculate the eigenvalues of a matrix and the parameters are such that there is a large difference (several orders of magnitude) between the entries. Theoretically, the matrix has only one ...
user avatar
8 votes
1 answer
265 views

Working around Memory Leak from HermiteDecomposition

I am running into an issue where HermiteDecomposition seems to leak memory, but only from certain matrices ...
user avatar
3 votes
1 answer
1k views

Is there a faster way to solve this linear programming problem?

I need to get a rational solution of the linear constraints ...
user avatar
  • 51
4 votes
2 answers
71 views

Looking for a efficient way of solving a matrix which is function of some variable

What is the efficient way to solve the matrix having a dependency on some varaible f. I have a simple matrix g which is ...
user avatar
8 votes
3 answers
479 views

Condition number of a matrix

I am finding it difficult to compute the condition number of a matrix using Mathematica. There is no built-in function, it seems, for this task. MatLab and Numpy have it. All stack searches point to ...
user avatar
2 votes
1 answer
66 views

Invert a generic n x n matrix

I want to invert a generic n x n matrix. Is it possible to do this with Mathematica? Consider, as a minimal example, the $n\times n$ matrix: \begin{bmatrix}1n&0&...&0\\0&2n& ... &...
user avatar
  • 151
-1 votes
1 answer
59 views

Help with equation within adjacency matrix

(Value R seen within desired matrix equation) resistance = 0.5; (L = ???) identitymat = IdentityMatrix[30]; fullmatrix = ((AdjacencyMatrix[plot])) + identitymat // MatrixForm p.s. I believe I have ...
user avatar
0 votes
0 answers
54 views

Unitary matrix with UnitaryMatrixQ

In the Mathematica help, the following example for a symbolic 2$\times$2 matrix $\left( \begin{array}{cc} a & b \\ c & d \\ \end{array} \right)$, with constraints, $c=b^{*}$ and $d=-a^{*}$ ...
user avatar
2 votes
2 answers
135 views

Find the maximum value of the minimum eigenvalue of the matrix

There is a $4×4$ matrix $Q$ where $c,d,e,m,n$ are variables. How to get the maximum value of the minimum eigenvalue of $Q$? $Q=$ $$\\\left( \begin{array}{cccc} \frac{12058305}{23104}-304 c & -849 ...
user avatar
  • 51
4 votes
0 answers
53 views

Calculate an n-order determinant by FindSequenceFunction

Calculate an n-order determinant: $\left|\begin{array}{cccccc}1 & 2 & 3 & \cdots & n-1 & n \\ n & 1 & 2 & \cdots & n-2 & n-1 \\ n-1 & n & 1 & \cdots ...
user avatar
  • 1,365
11 votes
11 answers
2k views

How can I construct this matrix?

How can I construct this matrix by MMA? $\left(\begin{array}{cccccc}1 & 2 & 3 & \cdots & n-1 & n \\ n & 1 & 2 & \cdots & n-2 & n-1 \\ n-1 & n & 1 & \...
user avatar
  • 1,365
4 votes
2 answers
237 views

Error in calculating determinant

Calculate n-order determinant (n>1): $\left|\begin{array}{cccccccc}a & b & 0 & 0 & \cdots & 0 & 0 & 0 \\ 0 & a & b & 0 & \cdots & 0 & 0 & 0 \\...
user avatar
  • 1,365
3 votes
1 answer
189 views

Calculate n-order determinant

Calculate n-order determinant (n>=2): $\left|\begin{array}{ccccc}x_{1}-a_{1} & x_{2} & x_{3} & \cdots & x_{n} \\ x_{1} & x_{2}-a_{2} & x_{3} & \cdots & x_{n} \\ x_{1}...
user avatar
  • 1,365
2 votes
1 answer
47 views

LinearSolve linear equations [duplicate]

I am new in Wolfram and dont understand how to solve equations with LinearSolve. I have used simple Solve, but what do I need to do with LinearSolve? ...
user avatar
  • 23
2 votes
2 answers
226 views

Three equation solving analytically in Mathematica

Im doing coding in iterative schemes but I do not know to solve three equations analytically in Mathematica step by step. For example I given thre equations in the attached figure. I want to solve ...
user avatar
  • 169
3 votes
2 answers
97 views

Set of quadratic forms and linear algebra

I have a set of quadratic forms. $L_{1}=u_1^TJ_{1}u_1$ $L_{2}=u_2^TJ_{2}u_2$ $L_{3}=u_3^TJ_{3}u_3$ where $u_{i=1,2,3}$ - 3$\times$1 vector; where $J_{i=1,2,3}$ - 3$\times$3 matrix; I need to pack ...
user avatar
  • 1,626
0 votes
0 answers
76 views

While loop to solve a diffusion problem

Crossposted at Wolfram Community: https://community.wolfram.com/groups/-/m/t/2506329 I am trying to use a While loop to solve for a diffusion problem using the power iteration method. The code is ...
user avatar
  • 1
0 votes
1 answer
48 views

Finding solutions linear system that contain only nonzero coordinates [closed]

I use the following code to output a list of k solutions of a linear system, solns = FindInstance[A.x == zeros, x, Reals, k] here ...
user avatar
  • 155
1 vote
0 answers
46 views

Simplifying RegionUnion call after CylindricalDecomposition

I want to simplify unions of output from CylindricalDecomposition calls. Consider: ...
user avatar
4 votes
1 answer
134 views

Tensorial calculus: A question about free and summed indices

I have to start with a full disclosure that I'm new to Mathematica, so this might be easy to resolve in a way that I don't know. I have to implement a triple contraction of an order three tensor $$d^{...
user avatar
  • 199
0 votes
1 answer
61 views

Working with matrices problem with MatrixForm [closed]

I'm just trying to set up a Matrix 24 by 24 with indices that start from 0 to 23 ...
user avatar
  • 199
5 votes
1 answer
79 views

How to prove that a list of algebraic numbers with the same symbolic expression is a number field?

Definition of number field (K): (1) $0,1 \in K$ (2) $\alpha, \beta \in K \Longrightarrow \alpha \pm \beta \ and\ \alpha \beta \in K$ (3) $\alpha, \beta \in K$, and $\beta \neq 0 \Longrightarrow \...
user avatar
  • 1,365
5 votes
2 answers
120 views

Finding polynomial relations between power series and sequences

In my research I often need to find polynomial relations between power series and number sequences. For example, in my essay "A Multisection of q-Series", I trisect a specific power series $\...
user avatar
  • 4,193
8 votes
2 answers
119 views

Efficient algorithm for calculating polynomial that has roots of a certain form

I have looked into this specific question on Math.SE concerning a more "mechanical" approach to finding a polynomial $p \in \mathbb{Q}[x]$ satisfying $p(\sqrt{2}+\sqrt{3}) = 0$. The user MJD ...
user avatar
  • 183
4 votes
1 answer
78 views

How can I get the intersect points of lines connecting different points?

How can I get the numeric points {x,y} where the lines below intersect, please? ...
user avatar
0 votes
1 answer
69 views

What kind of method does Solve use to solve a system of overdetermined linear equations?

I have a singular homogeneous linear system of equations, which easily can be solved by applying Solve: ...
user avatar
4 votes
3 answers
264 views

How can I rotate a 2D shape with respect to another?

...
user avatar
2 votes
1 answer
128 views

How to get the list of constant terms of linear equations? [closed]

A system of linear equations: $\left\{\begin{aligned} x_{1}+3 x_{2}+x_{3} &=2 \\ 3 x_{1}+4 x_{2}+2 x_{3} &=9 \\-x_{1}-5 x_{2}+4 x_{3} &=10 \\ 2 x_{1}+7 x_{2}+x_{3} &=1 \end{aligned}\...
user avatar
  • 1,365
0 votes
1 answer
62 views

Solving complicated linear system [closed]

I have this system and I would solve it with mathematica, I try with the instruction Solve but I have an error Please help me.
user avatar
  • 1
1 vote
0 answers
29 views

Solve the current equation with respect to one of the coefficients and substitute it into each equation of the system

Good day to all! In this question about recurrence relations, I had a simple case when the k + 1th variable is represented in terms of ...
user avatar
0 votes
0 answers
62 views

Solve coupled differential equation using Matrix

I am a complete beginner to Mathematica. I am trying to solve the following equation: $\frac{d}{dt}\rho_t = -0.5* \eta* \Gamma[\rho_t]$, where $\Gamma[\rho_t]$ is a 4x4 matrix whose coefficients are ...
user avatar
3 votes
1 answer
73 views

Replace previous equations into the current one in a recurrence relation

I have a recurrence relation given as follows: f[k + 1] == 1/a[k, k + 1] Sum[a[k, k - k1] f[k - k1], {k1,0,k-1}] Evaluating it for ...
user avatar
3 votes
1 answer
104 views

Change of basis matrix between symmetric matrices

I have two 5x5 matrices: ...
user avatar
  • 912
0 votes
1 answer
67 views

How to get exact solution for determinant in mathematica? [closed]

I am currently trying to program in mathematica, my issue is that the program is not solving for the exact value of the determinant in comparison to matlab. Code given below, where a and x are ...
user avatar
  • 1
0 votes
0 answers
60 views

How to find non-trivial solution to homogeneous linear equations by Mathematica using code (Input form)?

I have many homogeneous equations to which I am interested to find the non-trivial solution using Mathematica, But I am totally new to Mathematica, so I do no know, how to find the non-trivial ...
user avatar
0 votes
0 answers
36 views

Solve a homogeneous, linear system of algebraic equations with symbolic coefficients

Good day to all! I have a large system of homogeneous algebraic equations with symbolic coefficients. The following simplistic piece ...
user avatar
1 vote
0 answers
106 views

How is MatrixPower computed?

How does Mathematica compute MatrixPower[m,n]? The documentation states it is equivalent to Dot @@ ConstantArray[m, {n}], but ...
user avatar
  • 1,705
1 vote
3 answers
57 views

Solving a linear algebra problem of the form "For what $x$ below vectors are linearly independent?"

Let $v_1,v_2, v_3, v_4$ be four vectors, parametrized by $e$. How can I solve the following type of the problem in Mathematica? For what values of $e$ four vectors $v_i$ are linearly independent? ...
user avatar
0 votes
0 answers
48 views

showing that CylindricalDecomposition returns partition the space

I have 24 objects returned from eight calls to CylindricalDecomposition, say $exp_1$ ... $exp_24$. The objects are in the three dimensional reals, $(a, b, c)$, so ...
user avatar
1 vote
0 answers
84 views

Mathematica introduces unneccessary/wrong square root of complex number

I'm trying to use Mathematica to get the eigenvalues of the following matrix: \begin{bmatrix} \epsilon & v + ue^{ika} \\ v + u e^{-ika} & \epsilon \end{bmatrix} Executing the following ...
user avatar
  • 11
2 votes
0 answers
22 views

Threshold on triangular SparseArray

I am confused by the behavior of Threshold on sparse UpperTringularize (and LowerTringularize...
user avatar
0 votes
1 answer
88 views

Solve Riccati Equations by hand

I'm in the midst writing a bit about LQR problems and would like to show that some things in mathematica can be tested by trying to write such problems out by ones self, However I cannot seem to find ...
user avatar
1 vote
0 answers
39 views

I am searching for the Eigen stuff of a non linear transformation

I have a slightly odd problem I have been working on as part of a project on probability models. The full problem itself is not relevant but here is where I am stuck. I have a 6D space $P$, where all ...
user avatar
3 votes
0 answers
48 views

Transpose[m,{1,1}]

According to the documentation, Transpose with a second argument {1,1} on a square matrix returns the diagonal of the matrix. ...
user avatar
  • 1,603
4 votes
0 answers
63 views

Efficiently calculating half of the eigenvectors of a sparse array

Eigenvectors of a sparse array $\quad$ Problem statement I want to calculate the eigenvectors corresponding to the negative eigenvalues of an $8L^2 \times 8 L^2$ matrix ($L \sim 30 )$. Most of the ...
user avatar
1 vote
0 answers
39 views

Eigenvalues broken for nonsymmetric matrices

It looks that eigensystem calculation can easily go broken with real nonsymmetric/general complex matrices. Here are two examples with the possibly complex spectra plotted in the complex plane. I'm ...
user avatar
  • 4,006
5 votes
5 answers
412 views

Normal equation of plane through a point and line

I need to find the normal vector of the form Ax+By+C=0 of the plane that includes the point (6.82,1,5.56) and the line (7.82,6.82,6.56) +t(6,12,-6), with A=1. Of course, this is easy to do by hand, ...
user avatar
  • 127
4 votes
2 answers
244 views

How to apply a linear transformation to a tensor?

I would like to apply a linear transformation to a tensor. My linear transformation is encoded by a matrix, for example M = Table[m[i, j], {i, 4}, {j, 4}] Take some ...
user avatar
  • 143

1
2 3 4 5
29