Items tagged with linear-algebra

Feed

Hi,

I have 6 by 6 Hessian matrix H. I want to check whether it is a negative definite. The rule of negative definite is "if and only if its n leading principlal minors alternate in sign with the kth order leading principal minor should have same sign as (-1)^k".

In my Hessian H, some leading principal minor of H is zero while the nonzero ones follows above rule. So negative definite test fails and Now I have to check negative semidefinite test which state that "H is negative semidefinite if and only if every principal minor of odd order is <=0 and every principal minor of even orderis >=0". So I have to check sign of every principal minor ( instead of just leading principal minor) to check for negative semidefinite of H matrix.

Can anyone help me how can I compute sign of all principal minor of a 6 by 6 square Hessian matrix.

Thanks and Regards,

Nilesh

 

 

 

invalid input: LinearAlgebra:-Basis expects its 1st argument, V, to be of type {Vector, set(Vector), list(Vector)

A:=<<5,5,5>|<1,2,3>|<-5,1,2>>;
Basis(A);
 

Dear all

I have a linear system and I would like to generate the matrix from the linear system of equations

MatrixAgenerating.mw

Many thanks for your help

 

Hello guys!

Could you tell me what are the state-of-the-art algorithms to compute Hermite and Smith normal forms (well or just Hermite since the later can be computed by applying Hermite twice)? I am interested in these algorihtms which outputs also the respective unimodular matrices.

 

How do I assume variables as  Matrixs for calculation?
Please help me to solve this problem :

assume(M11::Matrix);
assume(M12::Matrix);
assume(M21::Matrix);
assume(M22::Matrix);
assume(A::Matrix);


A := M12*M21+M11;
                         M12 M21 + M11
solve(A = 0, M12);
Warning, solve may be ignoring assumptions on the input variables.
                               M11
                             - ---
                               M21
solve(A = 0, M12, useassumptions = true);
                               M11
                             - ---
                               M21


How can I get solution being a matrix?
Thank you very much !!!

Pay attention to the Next Question

 


Generate 8 random 3 by 3 matrices using the RandomMatrix command from the  LinearAlgebra package. As each matrix is generated use Eigenvalues to compute its eigenvalues. Then take the product of the eigenvalues, and check that for each matrix, this product is equal to the determinant of the matrix.  
 

So i got this code, im trying to iterate with jacobi and gaussseidel method.

H := HilbertMatrix(n, n, 1); b := Matrix(n, 1, proc (i) options operator, arrow; add(1/(i+j-1), j = 1 .. n) end proc); A := Matrix(n, 1, 1); Multiply(H, A); norm1H := norm(H, 1); norm2H := norm(H, 2); normHinf := norm(H, infinity); norm1b := norm(b, 1); norm2b := norm(b, 2); norminfb := norm(b, infinity); IterativeApproximate(H, initialapprox = Vector(n, 0), tolerance = 10^(-7), maxiterations = 10, method = gaussseidel)

 

But sadly no iteration gave me an answer, anyone knows wheres my mistake? i really help with this! 


thanks in advance

[Delta][4*4]*{b}[4*1]={0}

Which {b} is an eigenvector

Let say I have a linear system of equations with 28 unknowns (Z1, Z2, ..., Z28).

I know that dimension of space of solution > 0. I want for all unknowns to be expressed only by (let say: Z20, Z21, ..., Z28).

How to specify these free variables? I'm pretty sure it is implemented in Maple.

I consider  100 .100 real matrices A,B=Matrix(100,100,(i,j)->rand()) (with 12 significant digits).  In general, ConditionNumber(A) is <10^5; also I choose Digits:=17.Theoretically, the complexity of the calculations of Determinant(A), CharacteristicPolynomial(A,x), A.B and MatrixInverse(A) are similar (~n^3). Yet, the times of these calculations are respectively: 0"13, 0"67, 0"60 and, what surprises me, 75" (moreover, I don't display any result).

My question: concerning the calculation of the inverse, where does this factor 100 come from ? Would Matlab  be 100 times faster ? I do not see why this would be the case; in particular, the standard methods for the calculation of the inverse are  easily programmable.

Thanks in advance.

 

hello. I need help in finding the wronskian for any list of functions. i.e. if I input a nxn matrix i want it to calculate the determinant.  like here

with(linalg):
listM:=[sol,diff(sol,x)];
M:= convert(listM,matrix);
det(M);

I'm trying to compute the tensor product of two column vectors as

 

with(LinearAlgebra):

A:=Matrix([[1/sqrt(2)],[0],[0],[1/sqrt(2)]]);

KroneckerProduct(A,A);

 

And the output is a column vector with entries: "16 x 1 Matrix", "Data Type: Anything", "Storage: rectangular", "Order: Fortran_order"

 

The Maple documentation indicates that this function should output the result of the kronecker tensor product of the input matrices, and I've followed the same form as the examples in the documentation... Does anyone know why this isn't working as it should?

 

 

 

I have tried to solve a matrix with the function "LinearSolve" as seen in the picture, but instead of solving it just gives me back the operation i wrote (3). My which is to solve an equation system a quick as possible - have a templet fill in the matrix and press enter. I thought this "LinearSolve" function was the easiest way of doing. I know that I can right click and choose the function, but I want it as a command.

 

Any solutions on how to use the "LinearSolve" command to solve an equation system?

 

for example is there an existing package for reducing groups of matrices like the one below to only its unique elements, or do i basically need to use  linear algebra matrix operations ie finding the basis of the set via echeleon reduction blah blah

 

{Matrix(2, 2, {(1, 1) = 0, (1, 2) = 0, (2, 1) = 0, (2, 2) = -673/2880}), Matrix(2, 2, {(1, 1) = 0, (1, 2) = 0, (2, 1) = 0, (2, 2) = -5/96}), Matrix(2, 2, {(1, 1) = 0, (1, 2) = -(2521/17920)*Zeta(5), (2, 1) = 0, (2, 2) = -(2521/17920)*Zeta(3)-2087/1920}), Matrix(2, 2, {(1, 1) = 0, (1, 2) = 0, (2, 1) = 0, (2, 2) = 0}), Matrix(2, 2, {(1, 1) = 0, (1, 2) = -(7/320)*Zeta(5), (2, 1) = 0, (2, 2) = -(7/320)*Zeta(3)-499/840})}

1 2 3 4 5 6 7 Page 1 of 8