Items tagged with linear-algebra

Feed

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 !!!

I am looking for a nice algorithm to determine if a polynomial is expressible as an ALGEBRAIC combination of a list of other polynomials. I have written my own for LINEAR combinations, but cannot quite generalize this method.

 

Any help would be greatly appreciated.

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.  
 

Since GramSchmidt does not take Matrix as an input (I wish it did), I would like to know how to normalize a matrix rows. For example if input matrix is:

M = [  1    2]
       [  3    4]

How do I convert it into

Mn = [ 1/sqrt(5)    2/sqrt(5) ]
         [ 3/5            4/5          ]

Each row of matrix Mn has length of 1.

Thank you.

 

The following procedure is intended to recursively generate all vectors in the set of n dimension vectors with elements 0 to p-1. If I use a fixed value for p it works fine, but as soon as I introduced p as an argument it gives the error "Error, (in F) invalid input: F uses a 2nd argument, n, which is missing".

F:=proc(p,n)
  if n=1 then:
    return [seq(Vector([x]),x=0..(p-1))];
  else:
    return [ seq(seq(Vector([v[],xn]),v in F(n-1)),xn=0..(p-1)) ];
  end if:
end proc:

F(3,2);

I cannot for the life of me figure out what is wrong with the above code? Can anyone enlighten me?

Thanks in advance for your help.

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.

 

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})}

Hello! 

In an assigment I have been asked to use the Eigenvectors command to find the eigenvalues and eigenvectors of a particular matrix. 

As highlighted in the following image, my questions are:

1. What is the meaning of the suffix "+0.I"? Does it mean that there are further decimal digits which are not displayed?

2. How do the first and third eigenvalues, which are equal, result in different eigenvectors? As per my understanding, equal eigenvalues should have equal corresponding eigenvectors. Please help.

Hello dear!

Hope everyone fine, I am facing to solve the attached problem please find and fix it. I am waiting your kind response. 

naveed.mw

1 2 3 4 5 6 7 Page 1 of 8