STA: "IP-PosDefinite.2x2.txt" 13Nov2023: Given colvecs b0 and b1 (defined below), we compute the unique positive-definite matrix P such that the inner-product (acting on colvecs) (c0, c1) |-> TPose(c0) * P * c1 makes {b0,b1} an ortho-normal basis of |R^2. LISP CODE ;; For testing purposes, define the std basis: (setq e0 (mat-make-colvec 1 0) e1 (mat-make-colvec 0 1)) [ 1 ] [ 0 ] [ 0 ] , [ 1 ] (setq b0 (mat-make-colvec 1 3) b1 (mat-make-colvec 1 -1)) [ 1 ] [ 1 ] [ 3 ] , [ -1 ] ;; This will realize B-orthonormal IP, once I compute matrix P. (defun IP-by-P (c0 c1) (mat-E (mat-mul (mat-tpose c0) P c1) 0 0)) ;; Computing 2x2 matrix P: (setq Id-ToE-FrB (mat-Horiz-concat b0 b1)) => [ 1 1 ] [ 3 -1 ] (setq Id-ToB-FrE (mat-inverse? Id-ToE-FrB)) 1 [ 1 1 ] --- * [ ] 4 [ 3 -1 ] ;; Let's check that we have the correct CoB matrix. (mat-mul Id-ToB-FrE b0) => [ 1 ] [ 0 ] (mat-mul Id-ToB-FrE b1) => [ 0 ] [ 1 ] (setq P (mat-mul (mat-tpose Id-ToB-FrE) Id-ToB-FrE)) [ 5 -1 ] [ 5/8 -1/8 ] (1/8) * [ ] = [ ] [ -1 1 ] [ -1/8 1/8 ] (IP-by-P b0 b1) => 0 (IP-by-P b0 b0) => 1 (IP-by-P b1 b1) => 1 ;; Nifty. END: "IP-PosDefinite.2x2.txt"