Items tagged with matrix

i want to solve a system , A.b+B.X=0 , which A is 5*5 known matrix, B is 5*2 known matrix , and b is 5*1 and X is 2*1 unknown arbitary matrices ! i want to have solution for b and X . whatever they can be ! just equation to be solved !



A := Matrix(5, 5, {(1, 1) = -.9800, (1, 2) = 0, (1, 3) = 0, (1, 4) = -0.160e-1, (1, 5) = 0, (2, 1) = 1.0000, (2, 2) = 0, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (3, 1) = -2.1900, (3, 2) = -9.7800, (3, 3) = -0.280e-1, (3, 4) = 0.740e-1, (3, 5) = 0, (4, 1) = 77.3600, (4, 2) = -.7700, (4, 3) = -.2200, (4, 4) = -.6700, (4, 5) = 0, (5, 1) = 0, (5, 2) = -79.9700, (5, 3) = -0.300e-1, (5, 4) = .9900, (5, 5) = 0})



B := Matrix(5, 2, {(1, 1) = -2.44, (1, 2) = .58, (2, 1) = 0, (2, 2) = 0, (3, 1) = .18, (3, 2) = 19.62, (4, 1) = -6.48, (4, 2) = 0, (5, 1) = 0, (5, 2) = 0})



b := Matrix(5, 1, {(1, 1) = y[1], (2, 1) = y[2], (3, 1) = y[3], (4, 1) = y[4], (5, 1) = y[5]})



X := Matrix(2, 1, {(1, 1) = x[1], (2, 1) = x[2]})



M := Matrix(5, 1, {(1, 1) = -.9800*y[1]-0.160e-1*y[4]-2.44*x[1]+.58*x[2], (2, 1) = 1.0000*y[1], (3, 1) = -2.1900*y[1]-9.7800*y[2]-0.280e-1*y[3]+0.740e-1*y[4]+.18*x[1]+19.62*x[2], (4, 1) = 77.3600*y[1]-.7700*y[2]-.2200*y[3]-.6700*y[4]-6.48*x[1], (5, 1) = -79.9700*y[2]-0.300e-1*y[3]+.9900*y[4]})



Matrix([[-0.160e-1*y[4]-2.44*x[1]+.58*x[2]], [0.], [-9.7800*y[2]-0.280e-1*y[3]+0.740e-1*y[4]+.18*x[1]+19.62*x[2]], [-.7700*y[2]-.2200*y[3]-.6700*y[4]-6.48*x[1]], [-79.9700*y[2]-0.300e-1*y[3]+.9900*y[4]]])






actually the problem to be solved is M=0 ! which directly goes to y[1]=0;
after that , how can i find other unknowns so that M=0 is ok. tnx

Hello awesome maple people

I have the following Matrix

R := Matrix([[1, -2, 2, 6, -6], [2, -3, 4, 9, -8]])

then i do


and i get an output, but is there any way to get it to give me the output in Parametric form?

Like this

Thanks in advance :)



In a recent blog post, I found a single rotation that was equivalent to a sequence of Givens rotations, the underlying message being that teaching, learning, and doing mathematics is more effective and efficient when implemented with a tool like Maple. This post has the same message, but the medium is now the Householder reflection.

Given the vector x = , the Householder matrix H = I - 2 uuT reflects x to y = Hx, where I is the appropriate identity matrix, u = (x - y) / ||x - y|| is a unit normal for the plane (or hyperplane) across which x is reflected, and y necessarily has the same norm as x. The matrix H is orthogonal but its determinant is -1, making it a reflection instead of a rotation.

Starting with x and uH can be constructed and the reflection y calculated. Starting with x and yu and H can be determined. But what does any of this look like? Besides, when the Householder matrix is introduced as a tool for upper triangularizing a matrix, or for putting it into upper Hessenberg form, a recipe such as the one stated in Table 1 is the starting point.

In other words, the recipe in Table 1 reflects x to a vector y in which all entries below the kth are zero. Again, can any of this be visualized and rendered more concrete? (The chair who hired me into my first job averred that there are students who can learn from the general to the particular. Maybe some of my classmates in graduate school could, but in 40 years of teaching, I've never met one such student. Could that be because all things are known through the eyes of the beholder?)

In the attached worksheet, Householder matrices that reflect x = <5, -2, 1> to vectors y along the coordinate axes are constructed. These vectors and the reflecting planes are drawn, along with the appropriate normals u. In addition, the recipe in Table 1 is implemented, and the recipe itself examined. If you look at the worksheet, I believe you will agree that without Maple, the explorations shown would have been exceedingly difficult to carry out by hand.


I was wondering if there is a way to represent a matrix in a reduced state.  By this I am talking about:

      | 1/3 1/3|

A:=| 1/3 1/3|  Where A is 2x2 matrix.  I would like represent it as:


           | 1 1|

A:=1/3| 1 1| is that possible with maple???




I am trying to do an hourly simulation of a solar-thermal system. The method I am using requires an inital guess for a value which is used in a series of equations. That variable is then back calculated, and checked against the initial guess. If it is too far off, the back calculated value is used as the new guess and so on...

My question is twofold. First, is there a way to create a sort of module that can execute a number of steps when called upon (i.e. the iterative process described above). Second, how can I run this for each hour of the year (the weather inputs for each hour will change) without manually executing each one, one at a time. So far my guess is to make a matrix with the weather inputs for each hour, and then have some sort of loop read the rows (hours) one at a time, pull the data from it, run the series of steps, and then store the output for that hour in a new matrix. Is this the best way to do this? If so, which functions/tools in Maple should I look into that can do this for me?


Hi there,

            I am new to maple. I want to ask a simple question.

            If I have a array, and I want its each component to take natural logarithm. How can I do?

            Eg:[2 3 4]->[ln(2) ln(3) ln(4)]

            Thanks in advance.


Simple test of GaussianElimination function

Why doesn't this work? 

Also can I just confirm that for GaussianElimination (according to the help this uses LUDecomposition function with the output=['U'] option) the input is the augmented matrix of the system, the coefficient matrix augmented with the RHS)

In a separate test I got an example working using this code, but I've never seen this syntax before for A Matrix (using << it seems?)


Thank you for your help.





A := matrix(3, 3, [-3, 2, 1, 1, -2, 1, 1, 2, -3]);

Matrix(3, 3, {(1, 1) = -3, (1, 2) = 2, (1, 3) = 1, (2, 1) = 1, (2, 2) = -2, (2, 3) = 1, (3, 1) = 1, (3, 2) = 2, (3, 3) = -3})



Error, (in LinearAlgebra:-GaussianElimination) invalid input: LinearAlgebra:-GaussianElimination expects its 1st argument, A, to be of type Matrix() but received A





I want to analyze the runtimes on certain Linear Algebra functions in Maple, so I need a (large) set of matrices to input into these functions.

I have written the below code, which does succesfully generate a file of matrices:

The resulting file looks like:

However, I am unable to read the matrices from this file back into Maple. When using the code below, I get an error.

I think the error is that %a in fscanf scans up to the next whitespace, so the spacing in Matrix(3, 3, [[9,1,-4],[-5,6,-10],[-10,-4,-4]]) is throwing fscanf off. Do you guys know of any way I can fix this?


Or, is there a better way for me to generate these matrices so that they can be easily read into Maple? I've considered using ImportMatrix/ExportMatrix, but I believe that they only work for a single matrix, not the numerous ones that I would need. 

I have data matrix in text file.

I opened it with Maple and replaced decimal commas to decimal points + replaced column separator to semicolon.

Then I set 'Convert to plain text'.

After these modifications, I would like to export that Maple worksheet back to .txt  file with content exactly as shown on the display.

But if I export the worksheet as Maple text, extra pound signs are added to the beginning of each row. In this case I cannot import data to matrix datatype=float.

If I export the worksheet as Plain text, all the rows are destroyed and I cannot import data into matrix as well.

How can I export worksheet content, exactly as shown on display, into text file?

Hi everybody

In the attached file, when I run the code, a confusing error message appears. Obviously, the product of a 3*2 matrix by a 2*1 matrix is possible, but Maple gives an error. These 2 matrices are multiplied correctly in another worksheet. What's the source of this error?

Thanks in advance


I have this program which when I run gives me five unique matrices as I want it. I however, when I run it again the enries of the matrices changes and I get 5 identical matrices, how can I prevent this from happening?


Hello everybody,

I would like to ask: How many ways to impose the rank deficiency of a matrix J?

1. First is the determinant(J) = 0

2. Multiply with a non-zero vector V: so that we have J*V = 0;

3. be listed......


something about the minors of the matrix? 

I hope to have as many methods as possible!


I have this 5 by 2 matrix, and I want to form  lists of lengths 5, whereby the ith entry in my list should be any of the elements from the ith row of the matrix. How do i get all the possible lists? (I am expecting a total of 32lists, each of length 5):


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.

2 3 4 5 6 7 8 Last Page 4 of 46