How to build & store this large lower triangular matrix for matrix-vector multiplication?
问题 I need to create a lower triangular matrix with a special structure then do a matrix-vector multiplication. The matrix is parameterized by a value k . It main diagonal is a vector of k ^ 0 , i.e. 1; the first sub-diagonal is a vector of k ^ 1 , and the i -th sub-diagonal holds k ^ i . Here is a 5 x 5 example with k = 0.9 : structure(c(1, 0.9, 0.81, 0.729, 0.6561, 0, 1, 0.9, 0.81, 0.729, 0, 0, 1, 0.9, 0.81, 0, 0, 0, 1, 0.9, 0, 0, 0, 0, 1), .Dim = c(5L, 5L)) # [,1] [,2] [,3] [,4] [,5] #[1,] 1