The way I understand a pilot can log PIC if
1. He is acting as PIC (he is in charge of the flight)
2. He is manipulating the controls (and is rated etc for that aircraft)
3. He is an instructor
I'm presuming you mean if ANY of those is true.
Anyhow, your answer is still wrong.
The logging rules mean what they literally say in 61.51 The FAA has confirmed this many times (thankfully, I hate it when they confirm they don't mean what they say). FOR THE ONE HUNDREDTH TIME: BEING PILOT IN COMMAND IS NOT A NECESSARY NOR SUFFICIENT CONDITION TO LOG PIC TIME.
#1 above is completely wrong. You can't log PIC just because you are PIC. #3 is wrong that you can't log PIC time just because you are an instructor.
Let's look at each line in 61.51(e) Logging PIC time:
(1) A sport, recreational, private, commercial, or airline transport pilot may log pilot in command flight time for flights-
(i) When the pilot is the sole manipulator of the controls of an aircraft for which the pilot is rated, or has sport pilot privileges for that category and class of aircraft, if the aircraft class rating is appropriate;
This means that if you are the sole manipulator of the controls (which includes the autopilot if you want to split that hair), and you are rated appropriately above (again, currency, 61.31 endorsements, etc... do not count as ratings) you may log it. Note this includes time you are not legally allowed to actually be the pilot in command. In that case, there had better be a legal PIC along other than you.
(ii) When the pilot is the sole occupant in the aircraft
This is a bone to the student adding a new category/class rating (see the student pilot rule below) where they technically couldn't log the time as PIC only SOLO before.
(iii) When the pilot, except for a holder of a sport or recreational pilot certificate, acts as pilot in command of an aircraft for which more than one pilot is required under the type certification of the aircraft or the regulations under which the flight is conducted; or
This is the one that gets people. This is one time where being pilot in command gets you PART of the way. But you have to also meet the requirement that the regs (the intention of this was for things like part 135 crewing, but the FAA has confirmed simulated instrument flight qualifies by the letter of the reg) or the airplane requires multiple pilots by it's certification.
(iv) When the pilot performs the duties of pilot in command while under the supervision of a qualified pilot in command provided—...
This one is another relatively recent addition. It allows you to have a flight instructor "dummy" along in the right seat. This was a replacement for certain requirements that were previously required to be done SOLO. It was found that it's harder to get multiengine and the like planes that the insurer will allow someone to fly solo.
(
2) If rated to act as pilot in command of the aircraft, an airline transport pilot may log all flight time while acting as pilot in command of an operation requiring an airline transport pilot certificate.
ATP's get to log PIC in ATP-requiring operations just by virtue of being in command. Even if they're not in the cockpit. This was revised fairly recently as well to require it to actually be an ATP-requiring operation. Before, if you had an ATP you could be in the command of your buddies Bonanza flight and log it. This used in the "how many people can log PIC at the same time in a small aircraft" game.
(3) A certificated flight instructor may log pilot in command flight time for all flight time while serving as the authorized instructor in an operation if the instructor is rated to act as pilot in command of that aircraft.
Note that the key word here is that you must be serving as an instructor, not just flying in the plane (this is why your #3 is wrong). The FAA strung up a pair of instructors not too long ago for what they perceived as double logging. Note there's a revision here as well. They've added the "if the instructer is rated..." though I'm pretty sure that even before this change was made, the reg was in place that limited instructors to providing instruction in planes for which they held ratings.
4) A student pilot may log pilot-in-command time only when the student pilot—
(i) Is the sole occupant of the aircraft or is performing the duties of pilot of command of an airship requiring more than one pilot flight crewmember;
(ii) Has a solo flight endorsement as required under §61.87 of this part; and
(iii) Is undergoing training for a pilot certificate or rating.
This one also changed. A student pilot was previously never allowed to log PIC even when they were PIC (which they indeed are when soloing). They only could log SOLO time. This change allowed students to accumulate solo time during the studies Like the previous section, there's more redundency here as you can't legally solo as a student without the endorsement and you can't get the endorsement without being in training, but I'm sure some beancounter at the FAA decided this needed repeating.