# i want written equation with key in one line

i want written this

but lack a braces, How can I write just like the image?

    \documentclass{article}
\usepackage{tikz}
\usepackage{float}
\usepackage{amsmath}
\begin{document}

$$\begin{cases} p_1= \begin{bmatrix} -1\\ 1&\\ -1 \end{bmatrix},t_1=\begin{bmatrix} 0 \end{bmatrix} \end{cases}$$

$$\begin{cases} p_1= \begin{bmatrix} -1\\ 1&\\ -1 \end{bmatrix},t_1=\begin{bmatrix} 0 \end{bmatrix} \end{cases}$$

\end{document}


this is my result:

The following uses basic arrays and extensible delimiters to achieve the desired output:

\documentclass{article}

\usepackage{bm}
\renewcommand{\vec}{\bm}

\begin{document}

$\left\{ \vec{p}_1 = \left[\begin{array}{@{} r @{}} -1 \\ 1 \\ -1 \end{array}\right], t_1 = [1] \right\} \quad \left\{ \vec{p}_2 = \left[\begin{array}{@{} r @{}} 1 \\ 1 \\ -1 \end{array}\right], t_2 = [0] \right\}$

\end{document}


@{} in a column specification removes the spacing usually inserted at that point. So, \begin{array}{@{} r @{}} denotes an array without column spaces on the left and right of a single right-aligned column.