Matrix operation to exponentiate each element in a vector

280 Views Asked by At

I am using the following matrix algebra to obtain a vector, however, I eventually need all the resulting elements to be exponentiated.

\begin{equation} \begin{split} \boldsymbol{\beta}^{\textsf{T}}\mathbf{X}^{\textsf{T}}&= \begin{bmatrix} \beta_1 & \beta_2 & \beta_3 & \beta_4 \\ \end{bmatrix} \begin{bmatrix} {x_{11} } & {x_{21} } & \cdots & {x_{41} } \\ {x_{12} } & {x_{22} } & \cdots & {x_{42} } \\ \vdots & \vdots & \ddots & \vdots \\ {x_{14} } & {x_{24} } & \cdots & {x_{44} } \\ \end{bmatrix}\\ &=\begin{bmatrix} \mathbf{x}_1\boldsymbol{\beta} & \mathbf{x}_2\boldsymbol{\beta} & \mathbf{x}_3\boldsymbol{\beta} & \mathbf{x}_4\boldsymbol{\beta} \\ \end{bmatrix} \end{split} \end{equation}

What operation would I use to exponentiate each vector element in $\boldsymbol{\beta}^{\textsf{T}}\mathbf{X}^{\textsf{T}}$ to obtain:

\begin{equation} \begin{bmatrix} \exp(\mathbf{x}_1\boldsymbol{\beta}) & \exp(\mathbf{x}_2\boldsymbol{\beta}) & \exp(\mathbf{x}_3\boldsymbol{\beta}) & \exp(\mathbf{x}_4\boldsymbol{\beta}) \\ \end{bmatrix} \end{equation}

The rationale for asking is because I simply just can't introduce a vector whose elements are exponentiated, so I am thinking along the lines of a Kronecker or Hadamard type operation that can exponentiate all elements of a vector. Hence, what would the notation be?

2

There are 2 best solutions below

4
On BEST ANSWER

The "vector exponential" of ${\bf x} := \begin{bmatrix} x_1 & x_2 & \cdots & x_n \end{bmatrix}^\top$ can be obtained as follows

$$ \exp\left( \mbox{diag} ({\bf x}) \right) \,{\bf 1}_n$$

0
On

$\bf{X}\boldsymbol{\beta}$ is a vector with 4 rows an 1 column. We denote this vector $\bf{X}\boldsymbol{\beta} = \begin{bmatrix} (\bf{X}\boldsymbol{\beta})_1 \\ (\bf{X}\boldsymbol{\beta})_2 \\ (\bf{X}\boldsymbol{\beta})_3 \\ (\bf{X}\boldsymbol{\beta})_4 \\ \end{bmatrix}$ So,

$\boldsymbol{\beta}^{\textsf{T}}\mathbf{X}^{\textsf{T}} = \left(\bf{X}\boldsymbol{\beta}\right)^\textsf{T} = \begin{bmatrix} (\bf{X}\boldsymbol{\beta})_1 \\ (\bf{X}\boldsymbol{\beta})_2 \\ (\bf{X}\boldsymbol{\beta})_3 \\ (\bf{X}\boldsymbol{\beta})_4 \\ \end{bmatrix}^\textsf{T} $ $ = \begin{bmatrix} (\bf{X}\boldsymbol{\beta})_1 & (\bf{X}\boldsymbol{\beta})_2 & (\bf{X}\boldsymbol{\beta})_3 & (\bf{X}\boldsymbol{\beta})_4 \end{bmatrix}$.

If you want the row vector obtained by making each of the four values in this last matrix the exponent of the number $e$, you can write this as

$$\begin{bmatrix} \exp(\bf{X}\boldsymbol{\beta})_1 & \exp(\bf{X}\boldsymbol{\beta})_2 & \exp(\bf{X}\boldsymbol{\beta})_3 & \exp(\bf{X}\boldsymbol{\beta})_4 \end{bmatrix} =\sum_{k=1}^4 \left[\exp(\bf{e_k}^\intercal\cdot\bf{X}\boldsymbol{\beta})\right] \bf{e_k^{\;\intercal}} $$ where $\bf{e_k}$ is the $k^{th}$ column of the identity matrix (or equivalently, $\bf{e_k^{\;\intercal}}$ is the $k^{th}$ row of the identity matrix).