gt-linalg icon indicating copy to clipboard operation
gt-linalg copied to clipboard

Feedback on similarity

Open Spencer-Weston opened this issue 4 years ago • 1 comments

In reference to version 224734d7be7ff0c4a8adb3a206356ea122112f33

I believe these matrices are not similar:

image

I worked them out by hand, an online matrix calculator, and finally in R. In each, I found the product of CBC^-1 = [-12 & 30 \ 5 & 13] (hopefully the pseudo-latex makes sense).

Here's the r code:

`

b = matrix(c(3,0, 0, -2), nrow=2, ncol=2) b [,1] [,2] [1,] 3 0 [2,] 0 -2

c = matrix(c(-2,1, 3,-1), nrow=2, ncol=2) c [,1] [,2] [1,] -2 3 [2,] 1 -1

c_inv = ginv(c) c_inv [,1] [,2] [1,] 1 3 [2,] 1 2

c %% b %% c_inv [,1] [,2] [1,] -12 -30 [2,] 5 13 ` As you can see, the product of CBC^-1 != A. Please let me know if I'm missing anything here.

Spencer-Weston avatar May 11 '20 18:05 Spencer-Weston

Yes, I spent a lot of time on this too. The author has indicated on another issue post that C & C^-1 are reversed in the example.

eCubeH avatar May 16 '22 02:05 eCubeH