Ask Your Question

studentboy's profile - activity

2021-06-23 01:58:54 +0200 received badge  Nice Question (source)
2020-11-03 23:50:21 +0200 received badge  Famous Question (source)
2020-11-03 23:50:21 +0200 received badge  Notable Question (source)
2020-04-09 17:33:02 +0200 received badge  Notable Question (source)
2019-09-15 14:49:19 +0200 received badge  Famous Question (source)
2018-12-31 07:13:21 +0200 received badge  Notable Question (source)
2018-12-06 16:21:39 +0200 received badge  Popular Question (source)
2018-11-08 19:47:48 +0200 received badge  Popular Question (source)
2017-12-26 20:04:22 +0200 received badge  Popular Question (source)
2017-11-15 17:55:57 +0200 received badge  Editor (source)
2017-11-15 17:46:19 +0200 commented answer Calculation Kernel of a matrix

But expected,

1  0  0  0  0  0  0 -2  2  1
0  1  0  0  0  0  0 -1  1  1
0  0  1  0  0  0  0 -1  2  0
0  0  0  1  0  0  0  0  1  0
0  0  0  0  1  0  0 -1  1  0
0  0  0  0  0  1  0  1 -1 -1
0  0  0  0  0  0  1  1 -1  0
2017-11-15 17:44:57 +0200 commented answer Calculation Kernel of a matrix

Wow, that's a great help for me, really thank you. However, do you have an idea(algorithm) that helps to calculate the left kernel form? as shown on my code,

A.transposeInPlace();
FullPivLU<MatrixXf> lu(A);
MatrixXf A_null_space = lu.kernel();
A_null_space.transposeInPlace();

If write like this, it gives,

Null space:
 0.5    0   -1    1    0    0    0    0    0  0.5
-0.5    0   -0    0    1    0    0    0    0 -0.5
 0.5    0   -0    0    0    1    0    0    0 -0.5
 0.5    0   -0    0    0    0    1    0    0  0.5
  -1    0    1    0    0    0    0    1    0   -1
-0.5    0    1    0    0    0    0    0    1 -0.5
-0.5    1   -0    0    0    0    0    0    0  0.5
2017-11-15 15:38:29 +0200 asked a question Calculation Kernel of a matrix

I'm trying to write a program in which one part is related to calculation of kernel of a matrix. Its output and expected output are different. For example,

A = [[1, 0, 1], [1, 0, 0], [0, 1, 1], [0, 1, 0], [0, 0, 1], [-1, 0, 0], [0, 0, -1], [0, -1, 1], [0, -1, 0], [-1, 0, 1]]

A is the matrix whose kernel is wanted.

When I calculate its kernel with some programs they give output different, my program is as well. But, when I try to calculate its kernel some others, like SAGE, give output,

1  0  0  0  0  0  0 -2  2  1
0  1  0  0  0  0  0 -1  1  1
0  0  1  0  0  0  0 -1  2  0
0  0  0  1  0  0  0  0  1  0
0  0  0  0  1  0  0 -1  1  0
0  0  0  0  0  1  0  1 -1 -1
0  0  0  0  0  0  1  1 -1  0

The above one is what I expect as output. What is the point that I may overlook?

Here is my procedure to calculate the kernel in my program,

A.transposeInPlace();
FullPivLU<MatrixXf> lu(A);
MatrixXf A_null_space = lu.kernel();
A_null_space.transposeInPlace();

But in that way, I get different then expected one, but SAGE gives the above matrix that actually I expect.

 0.5    0   -1    1    0    0    0    0    0  0.5
-0.5    0   -0    0    1    0    0    0    0 -0.5
 0.5    0   -0    0    0    1    0    0    0 -0.5
 0.5    0   -0    0    0    0    1    0    0  0.5
  -1    0    1    0    0    0    0    1    0   -1
-0.5    0    1    0    0    0    0    0    1 -0.5
-0.5    1   -0    0    0    0    0    0    0  0.5

I'm really but really confused because both matrix seem right! How come?

Sage's output proof, https://i.stack.imgur.com/F3ryq.png My program's output proof, https://i.stack.imgur.com/7Mw8y.png

2017-10-25 10:43:21 +0200 commented answer how to use sage in PyCharm on CoCalc

I did it, when I run with ./sage -sh it's okay then I wrote pycharm & or pycharm.app &, I got Applications$ bash: PyCharm.app: command not found, I'm sure they are in same path

2017-10-24 11:53:12 +0200 received badge  Organizer (source)
2017-10-24 11:15:47 +0200 asked a question how to use sage in PyCharm on CoCalc

How can I use Sage library in PyCharm IDE like on CoCalc?

2017-10-17 18:01:59 +0200 received badge  Student (source)
2017-10-17 17:59:54 +0200 asked a question using sage library in C or C++?

Is there a way to run sage library in C/C++ or include the sage in C/C++? For example, I want to calculate minkowski sum, difference or decomposition in C or C++?