# Draw augmented matrix in tikz

I'm trying to create a very simple matrix in Tikz: can anybody help me with this? The matrix should look like this: • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. In general you will get much more useful answers if you add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. Nov 16 '15 at 18:27
• So do you want text/math in there? If yes, what size (e.g. s=5 and t=3)? Or just two rectangles with s and t written on the outside? What have you tried so far? Why do you think that didn't work? ... So please, improve your question with specifics. Nov 16 '15 at 19:17

Should it be (s+t)^2=2s^2? In this case:

\documentclass{article}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}[scale=3]
\draw (0,0) -- (1.412,0) -- (1.412,-1.412) -- (0,-1.412) -- cycle;
\draw (0,0) -- (1,0) -- (1,-1) -- (0,-1) -- cycle;
\node at (.5,.2) {\Large $s$};
\node at (1.206,.2) {\Large $t$};
\node at (-.2,-.5) {\Large $s$};
\node at (-.2,-1.206) {\Large $t$};
\end{tikzpicture}

\end{document} Edit: Thanks to @TomBombadil for pointing out that the above tikzpicture can be improved this way:

\begin{tikzpicture}[scale=3]
\draw (0,0) rectangle ({sqrt(2)},{-sqrt(2)});
\draw (0,0) rectangle (1,-1);
\node at (.5,.2) {\Large $s$};
\node at (1.206,.2) {\Large $t$};
\node at (-.2,-.5) {\Large $s$};
\node at (-.2,-1.206) {\Large $t$};
\end{tikzpicture}

• This is exactly what I needed, thank you so much Matt.
– LZG
Nov 16 '15 at 21:11