Kronecker Products and Stack Operator
定义
Stack Operator
对于任意的矩阵\(A \in \mathbb{R}^{m \times n}\),
\]
即按列展开.
Kronecker Product
对于任意的矩阵\(A \in \mathbb{R}^{m\times n }, B \in \mathbb{R}^{p \times q}\),
\left [
\begin{array}{ccc}
A_{00} \cdot B & \cdots & A_{0n-1} \cdot B \\
\vdots & \ddots & \vdots \\
A_{m-1,0} \cdot B & \cdots & A_{m-1,n-1} \cdot B
\end{array} \right ] \in \mathbb{R}^{mp \times nq}
\]
性质
Stack Operator
\]
Kronecker Product
易知,
\]
这里\([m] = \{0, 1, \ldots, m-1\}\).
\(a \otimes b = vec(b a^T)\)
- \(a \in \mathbb{R}^m, b \in \mathbb{R}^n\), 则
\[a \otimes b = vec(b a^T)
\]
\((A \otimes B)^T = (A^T \otimes B^T)\)
\((A \otimes B)^T = (A^T \otimes B^T)\)是显然的.
故
[A \otimes B]_{ip+s, *}^T = A_{i,*}^T \otimes B_{s,*}^T = vec(B^T_{s,*} A_{i,*}).
\]
半线性
\(A \otimes \alpha B = \alpha A \otimes B = \alpha (A \otimes B).\)
- \[(A+B) \otimes C = A \otimes C +B \otimes C \\
A \otimes (B+C) = A\otimes B + A \otimes C.
\] \((A \otimes B) \otimes C=A \otimes (B\otimes C)\):
\[\begin{array}{ll}
(A \otimes B) \otimes C &= [A_{i,j} \cdot B_{s,t} \cdot C ]\\
&= A \otimes (B \otimes C).
\end{array}
\]通常 \((A \otimes B) \not= (B \otimes A)\).
\((A \otimes B) (C\otimes D) = (AC \otimes BD)\)
[(A \otimes B) (C\otimes D)]_{ip+s, jq+t}
&= [A \otimes B]_{ip+s, *} [C\otimes D]_{*,jq+t} \\
&= vec(B_{s, *}^TA_{i,*})^T vec(D_{*,t} C_{*,j}^T) \\
&= \mathrm{Tr}(A_{i,*}^TB_{s,*}D_{*,t} C_{*,j}^T) \\
&= \mathrm{Tr}(C_{*,j}^TA_{i,*}^TB_{s,*}D_{*,t}) \\
&= A_{i, *}C_{*,j} \cdot B_{s, *} D_{*,t} \\
&= [AC]_{ij} \cdot [BD]_{st} \\
&= [AC \otimes BD]_{ip+s,jq+t}.
\end{array}
\]
\((A \otimes B)^{-1} = (A^{-1} \otimes B^{-1})\)
条件自然是A, B为满秩方阵:
\]
\(\mathrm{det}(A_{n\times n} \otimes B_{m \times m}) = \mathrm{det}(A)^m \cdot \mathrm{det}(B)^n\)
就像用普通的高斯消去法将矩阵化为对角型一样, 在对\(A_{n\times n } \otimes B_{m\times m}\)消去的过程中可以发现, \(B\)不会产生丝毫的影响, 结果便是显而易见的了.
\(\mathrm{Tr}(A \otimes B) = \mathrm{Tr}(A) \cdot \mathrm{Tr}(B)\)
\]
\(vec(ABC) = (C^T \otimes A) vec(B)\)
设\(A \in \mathbb{R}^{m\times n}, B \in \mathbb{R}^{n \times p}, C \in \mathbb{R}^{p \times q}\),
\]
特例:
\]
这个在处理梯度的时候会比较有用:
\]
则
\]
Kronecker Products and Stack Operator的更多相关文章
- C++数据结构之Linked Stack(链式栈)
上一节用连续的方式实现栈,这种方法用一个确定大小的数组存储栈元素,因为当存储达到数组上限时会遇到麻烦. 连续实现的栈与链式实现的栈的最大不同在于,前者使用一个确定大小的数组存储每一个栈元素,后者使用带 ...
- STL学习系列四:Stack容器
Stack简介 stack是堆栈容器,是一种“先进后出”的容器. stack是简单地装饰deque容器而成为另外的一种容器. #include <stack> 1.stack对象的默认构造 ...
- C++STL学习笔记_(3)stack
10.2.4stack容器 Stack简介 ² stack是堆栈容器,是一种"先进后出"的容器. ² stack是简单地装饰deque容器而成为另外的一种容器. ² #inc ...
- STL - stack(栈)
Stack简介 stack是堆栈容器,是一种"先进后出"的容器. stack是简单地装饰deque容器而成为另外的一种容器. #include <stack> stac ...
- 04--STL序列容器(Stack和Queue)
总括: stack和queue不支持迭代 一:栈Stack (一)栈的简介 stack是堆栈容器,是一种“先进后出”的容器. stack是简单地装饰deque容器而成为另外的一种容器. (二)栈的默认 ...
- STL之stack容器
1.stack容器 1) stack是堆栈容器,是一种“先进后出”的容器. 2)stack是简单地装饰deque容器而成为另外的一种容器. 3)头文件.#include <stack> 2 ...
- STL stack 容器
STL stack 容器 Stack简介 stack是堆栈容器,是一种“先进后出”的容器. stack是简单地装饰deque容器而成为另外的一种容器. #include <s ...
- C++ STL 之 stack
stack 是一种先进后出(first in last out,FILO)的数据结构,它只有一个出口,stack 只允许在栈顶新增元素,移除元素,获得顶端元素,但是除了顶端之外,其他地方不允许存取 元 ...
- C++ Templates (2.1 类模板Stack的实现 Implementation of Class Template Stack)
返回完整目录 目录 2.1 类模板Stack的实现 Implementation of Class Template Stack 2.1.1 声明类模板 Declaration of Class Te ...
随机推荐
- acre, across
acre The acre is a unit of land area used in the imperial and US customary systems. It is traditiona ...
- 【Penetration】红日靶场(一)
nmap探查存活主机 nmap -sP 10.10.2.0/24 图片: https://uploader.shimo.im/f/cfuQ653BEvyA42FR.png!thumbnail?acce ...
- 简化版chmod
我们知道对文件访问权限的修改在Shell下可通过chmod来进行 例如 可以看到v.c文件从无权限到所有者可读可写可执行.群组和其他用户可读可执行 chmod函数原型 int chmod(const ...
- Java8使用并行流(ParallelStream)注意事项
Java8并行流ParallelStream和Stream的区别就是支持并行执行,提高程序运行效率.但是如果使用不当可能会发生线程安全的问题.Demo如下: public static void co ...
- Linux学习 - 关机重启退出命令
一.shutdown 1 功能 关机.重启操作 2 语法 shutdown [-chr] [时间选项] -h 关机 -r 重启 -c 取消前一个关机命令 二.halt.poweroff(关机) 三 ...
- AFNetworking 网络错误提示data转换字符串
AFN在进行网络交互时,有时候会碰到返回502.500.404的时候.后台的总需要你配合他查出问题所在.但是AFN在返回数据序列化时解析错误只会转成NSData类型的数据,如果直接扔给后台Data的数 ...
- 【编程思想】【设计模式】【行为模式Behavioral】模板模式Template
Python转载版 https://github.com/faif/python-patterns/blob/master/behavioral/template.py #!/usr/bin/env ...
- Linux下查看JDK安装路径
在安装好Git.JDK和jenkins之后,就需要在jenkins中进行对应的设置,比如在全局工具配置模块,需要写入JDK的安装路径. 这篇博客,介绍几种常见的在Linux中查看JDK路径的方法... ...
- lucene的索引查询
package com.hope.lucene;import org.apache.lucene.document.Document;import org.apache.lucene.document ...
- centos 7 zookeeper 单体和集群搭建
1.操作相关命令 1.0 安装命令 wget :下载解压包 tar -xzvf :解压 1.1 创建节点 create / node : 创建一个名字为node的 空节点 creat ...