I'm trying to create a very simple matrix in Tikz: can anybody help me with this? The matrix should look like this:
Thank you in advance for all your help!
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityShould 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}
\documentclass{...}
and ending with\end{document}
.