2

I have a matrix $A$ defined as:

$$ A = \begin{bmatrix} a_{1,1} & a_{1,2} & \ldots & a_{1,m} \\ a_{2,1} & a_{2,2} & \ldots & a_{1,m} \\ \vdots & \vdots & \ddots & a_{1,m} \\ a_{n,1} & a_{n,2} & \ldots & a_{n,m} \end{bmatrix} $$

I have also a column vector $b$ defined as:

$$ b = \begin{bmatrix} b_{1} \\ b_{2} \\ \vdots \\ b_{n} \end{bmatrix} = \frac{1}{m} \begin{bmatrix} a_{1,1} + a_{1,2} + \ldots + a_{1,m} \\ a_{2,1} + a_{2,2} + \ldots + a_{1,m} \\ \vdots \\ a_{n,1} + a_{n,2} + \ldots + a_{n,m} \end{bmatrix} = \frac{1}{m} \begin{bmatrix} \sum_{i=1}^m a_{1,i} \\ \sum_{i=1}^m a_{2,i} \\ \vdots \\ \sum_{i=1}^m a_{n,i} \end{bmatrix} $$

My question is: there is a way to define $b$ without using the elements of $A$ (e.g. $a_{1,1}, a_{1,2}, \ldots, a_{n,m}$) but only performing some operations on directly on A?

1 Answers1

3

I think $$b = \dfrac{1}{m}\begin{bmatrix} a_{1,1} & a_{1,2} & \ldots & a_{1,m} \\ a_{2,1} & a_{2,2} & \ldots & a_{1,m} \\ \vdots & \vdots & \ddots & a_{1,m} \\ a_{n,1} & a_{n,2} & \ldots & a_{n,m} \end{bmatrix} \underbrace{\begin{bmatrix} 1\\1\\ \vdots \\ 1\\1\end{bmatrix}}_{m\times1}=\dfrac{1}{m}A\,\vec{1}$$ is the most compact way.

poyea
  • 1,662
  • Not a bad idea at all. I never saw the notation $\vec{1}$ but googling it I found that isn't uncommon. – gvgramazio Jun 18 '18 at 11:03
  • I was looking for something that could recall the python command numpy.sum(A, axis=1, keepdims = True)/m. But I think that this notation would be good. – gvgramazio Jun 18 '18 at 11:05