# How to place a kinked arrow above a matrix?

I would like to achieve something like this:

or optionally with a sharp kink:

Is that possible?

I stumbled across this post and some answers where tikz was used but wasn't able to adjust it to my need.

Welcome to TeX.se, please consider giving an MWE. This will help us a lot to answer your question accurately, also saves us time from going to our crystal balls ;-).

A starting point

\documentclass{article}
\usepackage{tikz}
\newcommand{\tikzmark}[1]{\tikz[overlay, remember picture] \coordinate (#1);}
%https://tex.stackexchange.com/questions/40535/matrix-with-arrows-and-labels
\begin{document}
$X = \qquad \bordermatrix{~ & ~ & ~ & ~ & ~ & ~ \cr \tikzmark{varrowtop} ~ & 0 & 0 & 0 & 1 & 1\tikzmark{harrowright} \cr ~ & 0 & 0 & 1 & 1 & 1 \cr ~ & 0 & 0 & 1 & 1 & 0 \cr ~ & 0 & 0 & 1 & 1 & 0 \cr \tikzmark{varrowbottom}~ & 0 & 0 & 0 & 0 & 0 \cr }$
\tikz[overlay,remember picture] {
\draw[->] (varrowbottom) -- ([yshift=3ex]varrowtop)  -- ([yshift=3ex]harrowright)
node[midway,above] {};
}
\end{document}

to get:

Smooth corners:

\documentclass{article}
\usepackage{tikz}
\newcommand{\tikzmark}[1]{\tikz[overlay, remember picture] \coordinate (#1);}
\begin{document}
$X = \qquad \bordermatrix{~ & ~ & ~ & ~ & ~ & ~ \cr \tikzmark{varrowtop} ~ & 0 & 0 & 0 & 1 & 1\tikzmark{harrowright} \cr ~ & 0 & 0 & 1 & 1 & 1 \cr ~ & 0 & 0 & 1 & 1 & 0 \cr ~ & 0 & 0 & 1 & 1 & 0 \cr \tikzmark{varrowbottom}~ & 0 & 0 & 0 & 0 & 0 \cr }$
\tikz[overlay,remember picture] {
\draw[->, rounded corners] (varrowbottom) -- ([yshift=3ex]varrowtop)  -- ([yshift=3ex]harrowright)
node[midway,above] {};
}
\end{document}

to get:

• Nice, but notice that there is a tikzmark package (which has the advantage of working even if the marks are defined after their usage...) Feb 19, 2019 at 12:02
• @Rmano Thanks for the remark. Till now, I did not knew its existence. I will take a note of it and go through it when I have some time. And, ensure it gets reflected in my future answers :-). Feb 19, 2019 at 12:54