How to label angles in a right triangle?

You are almost there. You just need to add

\usepackage{tkz-euclide}
\usetkzobj{all}

to the preamble.

\documentclass[border=10pt,tikz]{standalone}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}[scale=1.25]
  \coordinate [label=left:$C$] (C) at (-1.5cm,-1.cm);
  \coordinate [label=right:$A$] (A) at (1.5cm,-1.0cm);
  \coordinate [label=above:$B$] (B) at (1.5cm,1.0cm);
  \draw (C) -- node[above] {$a$} (B) -- node[right] {$c$} (A) -- node[below] {$b$} (C);
  \draw (1.25cm,-1.0cm) rectangle (1.5cm,-0.75cm);
  \tkzMarkAngle[size=1cm,color=cyan,mark=|](A,C,B)
  \tkzMarkAngle[size=1cm,color=cyan,mark=|](C,B,A)
\end{tikzpicture}
\end{document}

marked angles

EDIT

In a comment you mentioned wanting to avoid tkz-euclide. I actually only used this because the code you posted originally required it. If you wish to mark angles using plain TikZ (insofar as there is such a thing), you might use the angles and quotes libraries, which are part of PGF/TikZ itself.

For example:

\documentclass[border=10pt,tikz]{standalone}
\usetikzlibrary{angles,quotes}
\begin{document}
\begin{tikzpicture}[
  my angle/.style={
    every pic quotes/.append style={text=cyan},
    draw=cyan,
    angle radius=1cm,
  }]
  \coordinate [label=left:$C$] (C) at (-1.5,-1);
  \coordinate [label=right:$A$] (A) at (1.5,-1);
  \coordinate [label=above:$B$] (B) at (1.5,1);
  \draw (C) -- node[above] {$a$} (B) -- node[right] {$c$} (A) -- node[below] {$b$} (C);
  \draw (A) +(-.25,0) |- +(0,.25);
  \pic [my angle, "$\alpha$"] {angle=A--C--B};
  \pic [my angle, "$\beta$"] {angle=C--B--A};
\end{tikzpicture}
\end{document}

without <code>tkz-euclide</code>


A PSTricks solution using the pst-eucl package:

\documentclass{article}

\usepackage{pst-eucl}
\newcommand*\Label[3]{%
  \pcline[linestyle = none, offset = 6pt](#1)(#2)
  \ncput{#3}}

\begin{document}

\begin{pspicture}(-0.43,-0.35)(5.35,3.4) % boundry found manually
  \pstTriangle[PointSymbol = none](0,0){A}(5,3){B}(5,0){C}
  \pstRightAngle{B}{C}{A}
  \pstMarkAngle[LabelSep = 0.6]{C}{A}{B}{$\alpha$}
  \pstMarkAngle[LabelSep = 0.67]{A}{B}{C}{$\beta$}
  \Label{A}{B}{$c$}
  \Label{B}{C}{$a$}
  \Label{C}{A}{$b$}
\end{pspicture}

\end{document}

output


Now is correct, without errors!

enter image description here

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{tkz-euclide}
\usetkzobj{all}

\usepackage{etoolbox}
\makeatletter

\begin{document}
\begin{tikzpicture}[scale=1.25]
\coordinate [label=left:$C$] (A) at (-1.5cm,-1.cm);
\coordinate [label=right:$A$] (C) at (1.5cm,-1.0cm);
\coordinate [label=above:$B$] (B) at (1.5cm,1.0cm);

\draw 
 (A) --
node[above] {$a$} (B) --
node[right] {$c$} (C) -- 
node[below] {$b$} (A);

\draw
(1.25cm,-1.0cm) rectangle (1.5cm,-0.75cm);
\tkzMarkAngle[size=1cm,color=cyan,mark=|](C,A,B);
\end{tikzpicture}
\end{document}

For the second question you can use a grid.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{arrows}
\begin{document}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 
45,x=1.0cm,y=1.0cm]
\draw[step=1cm,gray,very thin] (-4,-4) grid (4,4);
\draw[color=black] (-4.,0.) -- (0.,0.);
draw[color=black] (0.,0.) -- (0.,3.);
\clip(-4.,-0.4) rectangle (0.4,3.4);
\draw [shift={(-4.,0.)},color=gray,fill=darkgray,fill opacity=0.1] (0,0) -- (0.:0.6) arc (0.:36.9:0.6) -- cycle;
\draw[color=gray,fill=darkgray,fill opacity=0.1] (0.,0.42) -- (-0.42,0.42) -- (-0.42,0.) -- (0.,0.) -- cycle; 
\draw (0.,3.)-- (-4.,0.);
\draw (-4.,0.)-- (0.,0.);
\draw (0.,0.)-- (0.,3.);
\draw[color=gray] (-3.2,0.4) node {\large $\theta$};
\draw[color=gray] (0.34,0.33);
\end{tikzpicture}
\end{document}

enter image description here

Tags:

Tikz Pgf