In Life of Pi, the reader is introduced to Pi as he now lives his life in Canada, after his ordeal at sea, left to fend for himself for 227 days. We immediately hear of his "strange religious practices" as he begins to explain things about himself to the "Author." This is an example of direct characterization as is Pi telling us that he is a good student. In chapter two, the reader gets a direct description of Pi; a slim and small man, aged less than forty.
In chapter three, Pi tells the reader how he got his name and about his introduction to swimming as a "willing disciple." Direct characterization reveals factual details about the character without the reader having to make assumptions.
Indirect characterization comes about when a person's traits are assumed such as, we know Pi is learned and educated because of his "double-major Bachelor’s degree." We also know that Pi's exposure to the westernized culture of Canada makes him "faint into the arms of a nurse" as "The first time I turned a tap on, its noisy, wasteful, superabundant gush was such a shock."
In the very short chapter two, despite "mild fall weather," Pi still needs to wrap up warmly, indicating his feelings of cold, or even his insecurities.
Having learnt that Pi is keen to swim, we learn of his swimming efforts when, at first, he "looked like a child throwing a peculiar, slow-motion tantrum." However, he apparently loves swimming and becomes very good, although he doesn't actually say so. It is obvious when he says "the water turning from molten lead to liquid light."
Martel uses both these techniques to build Pi's character as it ensures a rounded character - even if the reader finds Pi's story-telling far-fetched.