[Tex/LaTex] How to draw matrix with dots


How can I draw a matrix with dots in tex like the one shown below:


Best Answer

I suggest you load the amsmath package, employ its the bmatrix ("bracketed matrix") environment, and use \dots (or \ldots), \vdots ("vertical dots"), and \ddots ("diagonal dots") as needed.

The following screenshot shows two ways this approach could be employed. The first replicates the matrix shown in the OP's posting. The second shows that this method can be used for square as well as non-square matrices.

enter image description here

\usepackage{amsmath} % for 'bmatrix' environment
A = \begin{bmatrix} 
    a_{11} & a_{12} & \dots \\
    \vdots & \ddots & \\
    a_{K1} &        & a_{KK} 
B = \begin{bmatrix} 
    b_{11} & \dots  & b_{1M}\\
    \vdots & \ddots & \vdots\\
    b_{K1} & \dots  & b_{KM} 
Related Question