Boolean values: Logical expressions that evaluate to true or false. Used to ask simple questions with true or false answers. Later in this lecture (different video), we'll cover how to use these expressions to control the flow of execution based on how these expressions evaluate. In MATLAB, there is a logical type which is the result of boolean expressions (logical 1 is true, logical 0 is false). MATLAB will also use numerical values as logical values where any nonzero is true and 0 is false. Different from other languages where (only) 1 is true and 0 is false. Good coding practice: use 1 for true when you are using logical values, makes code easier to read for people familiar with other languages. Relational operators - boolean (true/false) expressions with numerical values (i.e. can be ordered/compared). Examples (a and b are numerical values): Greater than: a > b Greater than or equal: a >= b Less than: a < b Less than or equal: a <= b Equal: a == b Not equal: a ~= b These work on matrices as well: A and B are matrices of same size Demo: A > B Logical operators - Used to compare boolean (t/f) values and return a boolean value. Examples (a and b are boolean values (Remember MATLAB will treat any nonzero as true, zero as false if using numeric values instead)): And (true if a and b are true, false otherwise): a & b Or (true if at least one of a or b is true, false if both are false): a | b Not/negation (changes true to false and vice versa): ~a These three work for vector/matrix input as well! Downside - & and | do not use short curcuiting (I'll talk about this in a moment). Short curcuiting AND and OR: And: a && b Or: a || b Upside: more effecient than & and | (due to short curcuiting). Downside: only work with scalars. Preferred option when a and b are scalars. Short curcuiting expressions: A & B -> evaluate A, evaluate B, then AND to get result. A && B -> evaluate A, If A is false, result is false If A is true, evaluate B and the result is the value of B. A || B -> evaluate A, If A is true, result is true If A is false, evaluate B and result is the value of B. Thanks, end of boolean expressions video, please email/message/drop into office hours with questions.