vec2vecK {lazy.symbolic}R Documentation

Conversion of the vec of Matrix Product using vec operator and Kronecker Product

Description

Conversion of the vec of Matrix Product using vec operator and Kronecker Product

Usage

vec2vecK(A = "I", B = "I", C = "I")

Arguments

A

The first matrix or Identity matrix

B

The second matrix or Identity matrix

C

The third matrix or Identity matrix

Details

This function converts vec(A%*%B%*%C) to (t(C)%@%A) %*% vec(B).

Note that the input matrices can be numeric, semi symbolic, or full symbolic.

When the number of input matrices is less than 3, by choosing the matrices to be set equal to I, various results can be obtained.

Value

An expression as the result of conversion.

Examples

# full symbolic result
# general form
vec2vecK( "A","B","C")

# with two matrices
vec2vecK( "A","B")
vec2vecK( "A",,"B")
vec2vecK( ,"A","B")

## Not run: 
# checking with semi symbolic matrices
A <- demomat(2,2,root="a")
B <- demomat(2,2,root="b")
C <- demomat(2,2,root="c")

# general form
res1 <- vec(A%*%B%*%C)
res2 <- vec2vecK(A, B, C)

# two matrices
v0 <- vec(A%*%B)
v1 <- vec2vecK( A, B, diag(2) )
v2 <- vec2vecK( A, diag(2), B )
v3 <- vec2vecK( diag(2), A, B )
Print(v0,v1,v2,v3)

## End(Not run)


[Package lazy.symbolic version 0.1.4 ]