Express max/min with conditions

functionsmaxima-minimanotation

Relatively simple question, I'm wondering if max/min functions can be expressed with conditions? I'm not an expert on mathematical notation or anything, so I thought I'd come here. 🙂

I'm looking to express the maximum value in a range of numbers, up to a certain point. So if I had a set of numbers $x = {1, 3, 7, 9}$ and I want the maximum value of x up to 8, could I write $max(x | x < 8)$? This seems wrong to me, and I could not find an answer anywhere.

The specific situation I am looking to use some sort of condition for max is as follows:

Given a set of numbers $x = {1, 3, 5, 9, 7, 6}$, I need to express the maximum value that both precedes and is smaller than the value at the index I am looking at. So if I'm looking at $x_5$, which has the value 7, I would get 5.

I was thinking I could do something like: $max_{0 < i < k}(x_{k-i} | x_{k-i} < x_k)$

Sorry if it's off-topic, thank you for any help or guidance you can provide.

Best Answer

People do commonly put bounds on the index like this: $$\max_{0≤i<6} i^2 = 25.$$

For conditions like yours, you can ask for the maximum element of the set of things that satisfy your condition, and use set notation to specify the set: $$\max \{x_i\mid x_i<x_k \text{ and } i<k\}.$$

(This is not meaningful if the set is empty, unless you specifically define it to be.)

This is all standard, widely-used notation.