STA: "IP-PosDefinite.3x3.txt" Tuesday, 14Nov2023 Given colvecs b0, b1 and b2 in |R^3 [the vectors are defined below], we compute the unique positive-definite matrix Q such that the inner-product (acting on 3x1 colvecs) (c0, c1) |-> TPose(c0) * Q * c1 makes {b0,b1,b2} an ortho-normal basis of |R^2. ================================================================ LISP CODE (setq b0 (mat-make-colvec 1 0 1) b1 (mat-make-colvec 0 2 1) b2 (mat-make-colvec 1 -1 0) ) ;; The following fnc will realize B-orthonormal IP, ;; once we have computed positive-definite matrix Q. (defun IP-by-Q (ColX ColY) (mat-E (mat-mul (mat-tpose ColX) Q ColY) 0 0) ) ;; Computing 2x2 matrix Q: (setq Id-ToE-FrB (mat-Horiz-concat b0 b1 b2)) [ 1 0 1 ] [ 0 2 -1 ] [ 1 1 0 ] (setq Id-ToB-FrE (mat-inverse? Id-ToE-FrB)) [ -1 -1 2 ] [ 1 1 -1 ] [ 2 1 -2 ] ;; Let's check that we have the correct CoB matrix. [ 1 ] (mat-mul Id-ToB-FrE b0) => [ 0 ] [ 0 ] [ 0 ] (mat-mul Id-ToB-FrE b1) => [ 1 ] [ 0 ] [ 0 ] (mat-mul Id-ToB-FrE b2) => [ 0 ] [ 1 ] (setq Q (mat-mul (mat-tpose Id-ToB-FrE) Id-ToB-FrE)) [ 6 4 -7 ] [ 4 3 -5 ] [ -7 -5 9 ] ;;; Checking Checking Checking (list (IP-by-Q b0 b1) (IP-by-Q b0 b2) (IP-by-Q b1 b2)) (0, 0, 0) ;; Cool: Vectors b0,b1,b2 are pairwise-orthogonal (list (IP-by-Q b0 b0) (IP-by-Q b1 b1) (IP-by-Q b2 b2)) (1, 1, 1) ;; And each is of length 1. ;; [Technically, we view list (1, 1, 1) as (1^2, 1^2, 1^2).] ;; The computation was Smooth Sailing... END: "IP-PosDefinite.3x3.txt"